@kanso-labs/kanso-ui 0.26.2 → 0.26.3

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 (177) hide show
  1. package/dist/calendar/index.js +1 -1
  2. package/dist/calendar/index.js.map +1 -1
  3. package/dist/calendar/months.js.map +1 -1
  4. package/dist/calendar/styles.js.map +1 -1
  5. package/dist/chip/styles.js.map +1 -1
  6. package/dist/components/app-bar/index.js +148 -40
  7. package/dist/components/app-bar/index.js.map +1 -1
  8. package/dist/components/autocomplete/index.js +1 -1
  9. package/dist/components/autocomplete/index.js.map +1 -1
  10. package/dist/components/avatar/index.js +46 -14
  11. package/dist/components/avatar/index.js.map +1 -1
  12. package/dist/components/breadcrumbs/index.js +1 -1
  13. package/dist/components/breadcrumbs/index.js.map +1 -1
  14. package/dist/components/button/index.js +67 -18
  15. package/dist/components/button/index.js.map +1 -1
  16. package/dist/components/calendar/index.js +1 -1
  17. package/dist/components/calendar/index.js.map +1 -1
  18. package/dist/components/card/index.js +71 -19
  19. package/dist/components/card/index.js.map +1 -1
  20. package/dist/components/checkbox/index.js +1 -1
  21. package/dist/components/checkbox/index.js.map +1 -1
  22. package/dist/components/checkbox-group/index.js +1 -1
  23. package/dist/components/checkbox-group/index.js.map +1 -1
  24. package/dist/components/chip/index.js +1 -1
  25. package/dist/components/chip/index.js.map +1 -1
  26. package/dist/components/chip-group/index.js +118 -28
  27. package/dist/components/chip-group/index.js.map +1 -1
  28. package/dist/components/code/index.js.map +1 -1
  29. package/dist/components/color-area/index.js +66 -12
  30. package/dist/components/color-area/index.js.map +1 -1
  31. package/dist/components/color-field/index.js +61 -12
  32. package/dist/components/color-field/index.js.map +1 -1
  33. package/dist/components/color-picker/index.js +146 -43
  34. package/dist/components/color-picker/index.js.map +1 -1
  35. package/dist/components/color-slider/index.js +116 -21
  36. package/dist/components/color-slider/index.js.map +1 -1
  37. package/dist/components/color-swatch/index.js +1 -1
  38. package/dist/components/color-swatch/index.js.map +1 -1
  39. package/dist/components/color-swatch-picker/index.js +1 -1
  40. package/dist/components/color-swatch-picker/index.js.map +1 -1
  41. package/dist/components/color-wheel/index.js +75 -11
  42. package/dist/components/color-wheel/index.js.map +1 -1
  43. package/dist/components/combo-box/index.js +113 -32
  44. package/dist/components/combo-box/index.js.map +1 -1
  45. package/dist/components/container/index.js +53 -10
  46. package/dist/components/container/index.js.map +1 -1
  47. package/dist/components/copy-field/index.js +95 -40
  48. package/dist/components/copy-field/index.js.map +1 -1
  49. package/dist/components/currency/index.js +68 -11
  50. package/dist/components/currency/index.js.map +1 -1
  51. package/dist/components/date-field/index.js +64 -15
  52. package/dist/components/date-field/index.js.map +1 -1
  53. package/dist/components/date-picker/index.js +121 -38
  54. package/dist/components/date-picker/index.js.map +1 -1
  55. package/dist/components/date-range-picker/index.js +154 -52
  56. package/dist/components/date-range-picker/index.js.map +1 -1
  57. package/dist/components/dialog/index.js +87 -19
  58. package/dist/components/dialog/index.js.map +1 -1
  59. package/dist/components/disclosure/index.js +43 -10
  60. package/dist/components/disclosure/index.js.map +1 -1
  61. package/dist/components/disclosure-group/index.js +49 -6
  62. package/dist/components/disclosure-group/index.js.map +1 -1
  63. package/dist/components/drop-zone/index.js +1 -1
  64. package/dist/components/drop-zone/index.js.map +1 -1
  65. package/dist/components/drop-zone/styles.js.map +1 -1
  66. package/dist/components/feed/index.js +52 -9
  67. package/dist/components/feed/index.js.map +1 -1
  68. package/dist/components/form/index.js +39 -6
  69. package/dist/components/form/index.js.map +1 -1
  70. package/dist/components/icon-button/index.js +89 -29
  71. package/dist/components/icon-button/index.js.map +1 -1
  72. package/dist/components/keycap/index.js.map +1 -1
  73. package/dist/components/link/index.js +52 -11
  74. package/dist/components/link/index.js.map +1 -1
  75. package/dist/components/list/index.js +96 -16
  76. package/dist/components/list/index.js.map +1 -1
  77. package/dist/components/list-box/index.js +45 -8
  78. package/dist/components/list-box/index.js.map +1 -1
  79. package/dist/components/list-detail/index.js +99 -20
  80. package/dist/components/list-detail/index.js.map +1 -1
  81. package/dist/components/list-item/index.js +42 -15
  82. package/dist/components/list-item/index.js.map +1 -1
  83. package/dist/components/menu/index.js +139 -23
  84. package/dist/components/menu/index.js.map +1 -1
  85. package/dist/components/meter/index.js +68 -8
  86. package/dist/components/meter/index.js.map +1 -1
  87. package/dist/components/navigation-tree/index.js +1 -1
  88. package/dist/components/navigation-tree/index.js.map +1 -1
  89. package/dist/components/number-field/index.js +135 -47
  90. package/dist/components/number-field/index.js.map +1 -1
  91. package/dist/components/popover/index.js +226 -49
  92. package/dist/components/popover/index.js.map +1 -1
  93. package/dist/components/product-icon/index.js +50 -17
  94. package/dist/components/product-icon/index.js.map +1 -1
  95. package/dist/components/progress-indicator/index.js +92 -9
  96. package/dist/components/progress-indicator/index.js.map +1 -1
  97. package/dist/components/radio-group/index.js +44 -10
  98. package/dist/components/radio-group/index.js.map +1 -1
  99. package/dist/components/range-calendar/index.js +1 -1
  100. package/dist/components/range-calendar/index.js.map +1 -1
  101. package/dist/components/search-field/index.js +44 -9
  102. package/dist/components/search-field/index.js.map +1 -1
  103. package/dist/components/segmented-button/index.js +111 -19
  104. package/dist/components/segmented-button/index.js.map +1 -1
  105. package/dist/components/select/index.js +48 -10
  106. package/dist/components/select/index.js.map +1 -1
  107. package/dist/components/separator/index.js +21 -6
  108. package/dist/components/separator/index.js.map +1 -1
  109. package/dist/components/sheet/index.js +87 -19
  110. package/dist/components/sheet/index.js.map +1 -1
  111. package/dist/components/slider/index.js +90 -18
  112. package/dist/components/slider/index.js.map +1 -1
  113. package/dist/components/snackbar/index.js +1 -1
  114. package/dist/components/snackbar/index.js.map +1 -1
  115. package/dist/components/stack/index.js +54 -9
  116. package/dist/components/stack/index.js.map +1 -1
  117. package/dist/components/supporting-pane/index.js +91 -20
  118. package/dist/components/supporting-pane/index.js.map +1 -1
  119. package/dist/components/switch/index.js +57 -12
  120. package/dist/components/switch/index.js.map +1 -1
  121. package/dist/components/table/index.js +229 -46
  122. package/dist/components/table/index.js.map +1 -1
  123. package/dist/components/tabs/index.js +1 -1
  124. package/dist/components/tabs/index.js.map +1 -1
  125. package/dist/components/tag/index.js +53 -10
  126. package/dist/components/tag/index.js.map +1 -1
  127. package/dist/components/text/index.js +54 -9
  128. package/dist/components/text/index.js.map +1 -1
  129. package/dist/components/text-area/index.js +70 -15
  130. package/dist/components/text-area/index.js.map +1 -1
  131. package/dist/components/text-field/index.js +73 -16
  132. package/dist/components/text-field/index.js.map +1 -1
  133. package/dist/components/time-field/index.js +64 -15
  134. package/dist/components/time-field/index.js.map +1 -1
  135. package/dist/components/token-field/index.js +133 -18
  136. package/dist/components/token-field/index.js.map +1 -1
  137. package/dist/components/toolbar/index.js +68 -11
  138. package/dist/components/toolbar/index.js.map +1 -1
  139. package/dist/components/tooltip/index.js +87 -11
  140. package/dist/components/tooltip/index.js.map +1 -1
  141. package/dist/components/tree/index.js +96 -16
  142. package/dist/components/tree/index.js.map +1 -1
  143. package/dist/drag/hooks.js +1 -1
  144. package/dist/drag/hooks.js.map +1 -1
  145. package/dist/drag/index.js +1 -1
  146. package/dist/drag/index.js.map +1 -1
  147. package/dist/drag/styles.js.map +1 -1
  148. package/dist/field/index.js +338 -96
  149. package/dist/field/index.js.map +1 -1
  150. package/dist/field/root.js.map +1 -1
  151. package/dist/glyphs/index.js +1 -1
  152. package/dist/glyphs/index.js.map +1 -1
  153. package/dist/hooks/useImageLoadingStatus.js +1 -1
  154. package/dist/hooks/useImageLoadingStatus.js.map +1 -1
  155. package/dist/hooks/useRipple.js +1 -1
  156. package/dist/hooks/useRipple.js.map +1 -1
  157. package/dist/indicator/index.js +1 -1
  158. package/dist/indicator/index.js.map +1 -1
  159. package/dist/indicator/styles.js.map +1 -1
  160. package/dist/layout.js.map +1 -1
  161. package/dist/render/aria.js.map +1 -1
  162. package/dist/render/useRender.js +66 -21
  163. package/dist/render/useRender.js.map +1 -1
  164. package/dist/row/index.js +97 -23
  165. package/dist/row/index.js.map +1 -1
  166. package/dist/row/styles.js.map +1 -1
  167. package/dist/segments/index.js.map +1 -1
  168. package/dist/segments/styles.js.map +1 -1
  169. package/dist/styles/chequer.js.map +1 -1
  170. package/dist/styles/color.js.map +1 -1
  171. package/dist/styles/merge.js.map +1 -1
  172. package/dist/styles/overlay.js.map +1 -1
  173. package/dist/styles/picker.js.map +1 -1
  174. package/dist/styles/ripple.js.map +1 -1
  175. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  176. package/dist/tokens/values.js.map +1 -1
  177. package/package.json +8 -6
@@ -1,9 +1,9 @@
1
1
  import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
2
  import { mergeStatefulStyles, mergeStyles } from "../styles/merge.js";
3
3
  import { useInsideForm } from "./root.js";
4
+ import { c } from "react/compiler-runtime";
4
5
  import { createContext, useContext } from "react";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { c } from "react/compiler-runtime";
7
7
  import { Button, FieldError, FieldErrorContext, Group, Input, InputContext, Label, SelectStateContext, Text, TextArea, TextAreaContext, useSlottedContext } from "react-aria-components";
8
8
  //#region src/field/index.tsx
9
9
  const styles = {
@@ -343,12 +343,85 @@ function boxStyles(floatingLabel, multiline, leading, trailing, variant) {
343
343
  * label's colour follows. A field that provides no group context — one built
344
344
  * on a button rather than an input — passes the two states itself.
345
345
  */
346
- function FieldBox({ children, floatingLabel = true, isPopulated, label, leading, multiline = false, trailing, trigger, variant = "filled", ...props }) {
347
- return /* @__PURE__ */ jsx(Group, {
348
- ...props,
349
- ...mergeStatefulStyles(boxStyles(floatingLabel, multiline, leading !== void 0, trailing !== void 0, variant), props),
350
- children: boxContent(label, children, floatingLabel, isPopulated, leading, trailing, trigger, variant)
351
- });
346
+ function FieldBox(t0) {
347
+ const $ = c(26);
348
+ let T0;
349
+ let children;
350
+ let floatingLabel;
351
+ let isPopulated;
352
+ let label;
353
+ let leading;
354
+ let t1;
355
+ let t2;
356
+ let trailing;
357
+ let trigger;
358
+ let variant;
359
+ if ($[0] !== t0) {
360
+ const { children: t3, floatingLabel: t4, isPopulated: t5, label: t6, leading: t7, multiline: t8, trailing: t9, trigger: t10, variant: t11, ...props } = t0;
361
+ children = t3;
362
+ isPopulated = t5;
363
+ label = t6;
364
+ leading = t7;
365
+ trailing = t9;
366
+ trigger = t10;
367
+ floatingLabel = t4 === void 0 ? true : t4;
368
+ const multiline = t8 === void 0 ? false : t8;
369
+ variant = t11 === void 0 ? "filled" : t11;
370
+ T0 = Group;
371
+ t1 = props;
372
+ t2 = mergeStatefulStyles(boxStyles(floatingLabel, multiline, leading !== void 0, trailing !== void 0, variant), props);
373
+ $[0] = t0;
374
+ $[1] = T0;
375
+ $[2] = children;
376
+ $[3] = floatingLabel;
377
+ $[4] = isPopulated;
378
+ $[5] = label;
379
+ $[6] = leading;
380
+ $[7] = t1;
381
+ $[8] = t2;
382
+ $[9] = trailing;
383
+ $[10] = trigger;
384
+ $[11] = variant;
385
+ } else {
386
+ T0 = $[1];
387
+ children = $[2];
388
+ floatingLabel = $[3];
389
+ isPopulated = $[4];
390
+ label = $[5];
391
+ leading = $[6];
392
+ t1 = $[7];
393
+ t2 = $[8];
394
+ trailing = $[9];
395
+ trigger = $[10];
396
+ variant = $[11];
397
+ }
398
+ let t3;
399
+ if ($[12] !== children || $[13] !== floatingLabel || $[14] !== isPopulated || $[15] !== label || $[16] !== leading || $[17] !== trailing || $[18] !== trigger || $[19] !== variant) {
400
+ t3 = boxContent(label, children, floatingLabel, isPopulated, leading, trailing, trigger, variant);
401
+ $[12] = children;
402
+ $[13] = floatingLabel;
403
+ $[14] = isPopulated;
404
+ $[15] = label;
405
+ $[16] = leading;
406
+ $[17] = trailing;
407
+ $[18] = trigger;
408
+ $[19] = variant;
409
+ $[20] = t3;
410
+ } else t3 = $[20];
411
+ let t4;
412
+ if ($[21] !== T0 || $[22] !== t1 || $[23] !== t2 || $[24] !== t3) {
413
+ t4 = /* @__PURE__ */ jsx(T0, {
414
+ ...t1,
415
+ ...t2,
416
+ children: t3
417
+ });
418
+ $[21] = T0;
419
+ $[22] = t1;
420
+ $[23] = t2;
421
+ $[24] = t3;
422
+ $[25] = t4;
423
+ } else t4 = $[25];
424
+ return t4;
352
425
  }
353
426
  /**
354
427
  * A field's text control, in a {@link FieldBox} or on its own. React Aria's
@@ -361,12 +434,16 @@ function FieldBox({ children, floatingLabel = true, isPopulated, label, leading,
361
434
  * blank otherwise. Outside a box it has no label over it and shows the
362
435
  * placeholder it was given in every state.
363
436
  */
364
- function FieldInput({ numeric = false, placeholder, prefix, suffix, ...props }) {
437
+ function FieldInput(t0) {
438
+ const $ = c(18);
439
+ const { numeric: t1, placeholder, prefix, suffix, ...props } = t0;
440
+ const numeric = t1 === void 0 ? false : t1;
365
441
  const box = useContext(BoxContext);
366
- const control = /* @__PURE__ */ jsx(Input, {
367
- placeholder: placeholder ?? (box.label === "floating" ? " " : void 0),
368
- ...props,
369
- ...mergeStatefulStyles((state) => ({
442
+ const T0 = Input;
443
+ const t2 = placeholder ?? (box.label === "floating" ? " " : void 0);
444
+ let t3;
445
+ if ($[0] !== box || $[1] !== numeric) {
446
+ t3 = (state) => ({
370
447
  0: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv" },
371
448
  8: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv xwuztrq" },
372
449
  4: { className: "xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x1mvm7v4 xxqzaim" },
@@ -383,29 +460,69 @@ function FieldInput({ numeric = false, placeholder, prefix, suffix, ...props })
383
460
  11: { className: "xjbqb8w xc342km x9f619 x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv xwuztrq xbppi91 xss6m8b x7ip5l3 x1xj74d8" },
384
461
  7: { className: "xjbqb8w xc342km x9f619 x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv xbppi91 xss6m8b x7ip5l3 x1xj74d8" },
385
462
  15: { className: "xjbqb8w xc342km x9f619 x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv xwuztrq xbppi91 xss6m8b x7ip5l3 x1xj74d8" }
386
- })[!!box.underLabel << 3 | !!(box.label === "floating") << 2 | !!numeric << 1 | !!state.isDisabled << 0], props)
387
- });
463
+ })[!!box.underLabel << 3 | !!(box.label === "floating") << 2 | !!numeric << 1 | !!state.isDisabled << 0];
464
+ $[0] = box;
465
+ $[1] = numeric;
466
+ $[2] = t3;
467
+ } else t3 = $[2];
468
+ const t4 = mergeStatefulStyles(t3, props);
469
+ let t5;
470
+ if ($[3] !== T0 || $[4] !== props || $[5] !== t2 || $[6] !== t4) {
471
+ t5 = /* @__PURE__ */ jsx(T0, {
472
+ placeholder: t2,
473
+ ...props,
474
+ ...t4
475
+ });
476
+ $[3] = T0;
477
+ $[4] = props;
478
+ $[5] = t2;
479
+ $[6] = t4;
480
+ $[7] = t5;
481
+ } else t5 = $[7];
482
+ const control = t5;
388
483
  if (prefix === void 0 && suffix === void 0) return control;
389
- return /* @__PURE__ */ jsxs("span", {
390
- className: "x1pha0wt x78zum5 x14qo01y",
391
- children: [
392
- prefix === void 0 ? null : /* @__PURE__ */ jsx("span", {
393
- ...{
394
- 0: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft" },
395
- 1: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft xwuztrq" }
396
- }[!!box.underLabel << 0],
397
- children: prefix
398
- }),
399
- control,
400
- suffix === void 0 ? null : /* @__PURE__ */ jsx("span", {
401
- ...{
402
- 0: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft" },
403
- 1: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft xwuztrq" }
404
- }[!!box.underLabel << 0],
405
- children: suffix
406
- })
407
- ]
408
- });
484
+ let t6;
485
+ if ($[8] !== box || $[9] !== prefix) {
486
+ t6 = prefix === void 0 ? null : /* @__PURE__ */ jsx("span", {
487
+ ...{
488
+ 0: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft" },
489
+ 1: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft xwuztrq" }
490
+ }[!!box.underLabel << 0],
491
+ children: prefix
492
+ });
493
+ $[8] = box;
494
+ $[9] = prefix;
495
+ $[10] = t6;
496
+ } else t6 = $[10];
497
+ let t7;
498
+ if ($[11] !== box || $[12] !== suffix) {
499
+ t7 = suffix === void 0 ? null : /* @__PURE__ */ jsx("span", {
500
+ ...{
501
+ 0: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft" },
502
+ 1: { className: "x2lah0s x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej xkzkux9 xt3l3uh xpc4ca7 xuxw1ft xwuztrq" }
503
+ }[!!box.underLabel << 0],
504
+ children: suffix
505
+ });
506
+ $[11] = box;
507
+ $[12] = suffix;
508
+ $[13] = t7;
509
+ } else t7 = $[13];
510
+ let t8;
511
+ if ($[14] !== control || $[15] !== t6 || $[16] !== t7) {
512
+ t8 = /* @__PURE__ */ jsxs("span", {
513
+ className: "x1pha0wt x78zum5 x14qo01y",
514
+ children: [
515
+ t6,
516
+ control,
517
+ t7
518
+ ]
519
+ });
520
+ $[14] = control;
521
+ $[15] = t6;
522
+ $[16] = t7;
523
+ $[17] = t8;
524
+ } else t8 = $[17];
525
+ return t8;
409
526
  }
410
527
  /**
411
528
  * A field's multi-line text control, in a {@link FieldBox} drawn `multiline`.
@@ -419,27 +536,69 @@ function FieldInput({ numeric = false, placeholder, prefix, suffix, ...props })
419
536
  * in the same grid cell as the control, and the cell is as tall as whichever
420
537
  * of the two is taller.
421
538
  */
422
- function FieldTextArea({ autosize = false, placeholder, ...props$1 }) {
539
+ function FieldTextArea(t0) {
540
+ const $ = c(15);
541
+ const { autosize: t1, placeholder, ...props$1 } = t0;
542
+ const autosize = t1 === void 0 ? false : t1;
423
543
  const box = useContext(BoxContext);
424
544
  const context = useSlottedContext(TextAreaContext);
425
545
  const value = typeof context?.value === "string" ? context.value : "";
426
- const control = /* @__PURE__ */ jsx(TextArea, {
427
- placeholder: placeholder ?? (box.label === "floating" ? " " : void 0),
428
- ...props$1,
429
- ...mergeStatefulStyles((state) => props(styles.input, box.underLabel && styles.inputUnderLabel, box.label === "floating" && styles.inputUnderFloatingLabel, styles.textArea, autosize && styles.textAreaAutosize, autosize && styles.autosizeCell, state.isDisabled && styles.inputDisabled), props$1)
430
- });
546
+ const T0 = TextArea;
547
+ const t2 = placeholder ?? (box.label === "floating" ? " " : void 0);
548
+ let t3;
549
+ if ($[0] !== autosize || $[1] !== box) {
550
+ t3 = (state) => props(styles.input, box.underLabel && styles.inputUnderLabel, box.label === "floating" && styles.inputUnderFloatingLabel, styles.textArea, autosize && styles.textAreaAutosize, autosize && styles.autosizeCell, state.isDisabled && styles.inputDisabled);
551
+ $[0] = autosize;
552
+ $[1] = box;
553
+ $[2] = t3;
554
+ } else t3 = $[2];
555
+ const t4 = mergeStatefulStyles(t3, props$1);
556
+ let t5;
557
+ if ($[3] !== T0 || $[4] !== props$1 || $[5] !== t2 || $[6] !== t4) {
558
+ t5 = /* @__PURE__ */ jsx(T0, {
559
+ placeholder: t2,
560
+ ...props$1,
561
+ ...t4
562
+ });
563
+ $[3] = T0;
564
+ $[4] = props$1;
565
+ $[5] = t2;
566
+ $[6] = t4;
567
+ $[7] = t5;
568
+ } else t5 = $[7];
569
+ const control = t5;
431
570
  if (!autosize) return control;
432
- return /* @__PURE__ */ jsxs("div", {
433
- className: "xrvj5dj",
434
- children: [control, /* @__PURE__ */ jsxs("div", {
571
+ let t6;
572
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
573
+ t6 = {
574
+ 0: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x1mzt3pk xlshs6z x126k92a x1b1wf8y" },
575
+ 1: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv xwuztrq x1mzt3pk xlshs6z x126k92a x1b1wf8y" }
576
+ };
577
+ $[8] = t6;
578
+ } else t6 = $[8];
579
+ const t7 = t6[!!box.underLabel << 0];
580
+ let t8;
581
+ if ($[9] !== t7 || $[10] !== value) {
582
+ t8 = /* @__PURE__ */ jsxs("div", {
435
583
  "aria-hidden": "true",
436
- ...{
437
- 0: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x1mzt3pk xlshs6z x126k92a x1b1wf8y" },
438
- 1: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv xwuztrq x1mzt3pk xlshs6z x126k92a x1b1wf8y" }
439
- }[!!box.underLabel << 0],
584
+ ...t7,
440
585
  children: [value, " "]
441
- })]
442
- });
586
+ });
587
+ $[9] = t7;
588
+ $[10] = value;
589
+ $[11] = t8;
590
+ } else t8 = $[11];
591
+ let t9;
592
+ if ($[12] !== control || $[13] !== t8) {
593
+ t9 = /* @__PURE__ */ jsxs("div", {
594
+ className: "xrvj5dj",
595
+ children: [control, t8]
596
+ });
597
+ $[12] = control;
598
+ $[13] = t8;
599
+ $[14] = t9;
600
+ } else t9 = $[14];
601
+ return t9;
443
602
  }
444
603
  /**
445
604
  * The press target over a {@link FieldBox} whose whole surface opens
@@ -486,22 +645,34 @@ function FieldTrigger(props) {
486
645
  * under a floating label it is hidden until the field is focused, exactly as
487
646
  * an input's placeholder is.
488
647
  */
489
- function FieldValue({ isFocused = false, isPlaceholder = false, ...props }) {
648
+ function FieldValue(t0) {
649
+ const $ = c(3);
650
+ const { isFocused: t1, isPlaceholder: t2, ...props } = t0;
651
+ const isFocused = t1 === void 0 ? false : t1;
652
+ const isPlaceholder = t2 === void 0 ? false : t2;
490
653
  const box = useContext(BoxContext);
491
654
  const hidden = isPlaceholder && box.label === "floating" && !isFocused;
492
- return /* @__PURE__ */ jsx("span", {
493
- ...props,
494
- ...mergeStyles({
495
- 0: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft" },
496
- 4: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq" },
497
- 2: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft x1w5n3ug" },
498
- 6: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq x1w5n3ug" },
499
- 1: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft x19co3pv" },
500
- 5: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq x19co3pv" },
501
- 3: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft x19co3pv" },
502
- 7: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq x19co3pv" }
503
- }[!!box.underLabel << 2 | !!isPlaceholder << 1 | !!hidden << 0], props)
504
- });
655
+ const t3 = mergeStyles({
656
+ 0: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft" },
657
+ 4: { className: "x1hgeflb xjbqb8w xc342km x9f619 x139gbkf x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq" },
658
+ 2: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft x1w5n3ug" },
659
+ 6: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq x1w5n3ug" },
660
+ 1: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft x19co3pv" },
661
+ 5: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq x19co3pv" },
662
+ 3: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft x19co3pv" },
663
+ 7: { className: "x1hgeflb xjbqb8w xc342km x9f619 x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xh7dzej x1t137rt x1717udv x6s0dn4 x78zum5 xb3r6kr xlyipyv xuxw1ft xwuztrq x19co3pv" }
664
+ }[!!box.underLabel << 2 | !!isPlaceholder << 1 | !!hidden << 0], props);
665
+ let t4;
666
+ if ($[0] !== props || $[1] !== t3) {
667
+ t4 = /* @__PURE__ */ jsx("span", {
668
+ ...props,
669
+ ...t3
670
+ });
671
+ $[0] = props;
672
+ $[1] = t3;
673
+ $[2] = t4;
674
+ } else t4 = $[2];
675
+ return t4;
505
676
  }
506
677
  function useFieldPopulated() {
507
678
  const input = useSlottedContext(InputContext);
@@ -523,11 +694,20 @@ function useFieldPopulated() {
523
694
  * its control through context.
524
695
  */
525
696
  const NO_STATE = {};
526
- function FieldLabel({ state = NO_STATE, ...props }) {
527
- const { isDisabled = false, isFocusWithin = false, isInvalid = false } = state;
528
- return /* @__PURE__ */ jsx(Label, {
529
- ...props,
530
- ...mergeStyles({
697
+ function FieldLabel(t0) {
698
+ const $ = c(8);
699
+ let T0;
700
+ let t1;
701
+ let t2;
702
+ if ($[0] !== t0) {
703
+ const { state: t3, ...props } = t0;
704
+ const { isDisabled: t4, isFocusWithin: t5, isInvalid: t6 } = t3 === void 0 ? NO_STATE : t3;
705
+ const isDisabled = t4 === void 0 ? false : t4;
706
+ const isFocusWithin = t5 === void 0 ? false : t5;
707
+ const isInvalid = t6 === void 0 ? false : t6;
708
+ T0 = Label;
709
+ t1 = props;
710
+ t2 = mergeStyles({
531
711
  0: { className: "x1w5n3ug xkzkux9 xixa3zk xpc4ca7" },
532
712
  4: { className: "xkzkux9 xixa3zk xpc4ca7 x1xj74d8" },
533
713
  2: { className: "xkzkux9 xixa3zk xpc4ca7 x4ii1qj" },
@@ -536,8 +716,28 @@ function FieldLabel({ state = NO_STATE, ...props }) {
536
716
  5: { className: "xkzkux9 xixa3zk xpc4ca7 x1mxwv8y" },
537
717
  3: { className: "xkzkux9 xixa3zk xpc4ca7 x1mxwv8y" },
538
718
  7: { className: "xkzkux9 xixa3zk xpc4ca7 x1mxwv8y" }
539
- }[!!isDisabled << 2 | !!isInvalid << 1 | !!(!isDisabled && !isInvalid && isFocusWithin) << 0], props)
540
- });
719
+ }[!!isDisabled << 2 | !!isInvalid << 1 | !!(!isDisabled && !isInvalid && isFocusWithin) << 0], props);
720
+ $[0] = t0;
721
+ $[1] = T0;
722
+ $[2] = t1;
723
+ $[3] = t2;
724
+ } else {
725
+ T0 = $[1];
726
+ t1 = $[2];
727
+ t2 = $[3];
728
+ }
729
+ let t3;
730
+ if ($[4] !== T0 || $[5] !== t1 || $[6] !== t2) {
731
+ t3 = /* @__PURE__ */ jsx(T0, {
732
+ ...t1,
733
+ ...t2
734
+ });
735
+ $[4] = T0;
736
+ $[5] = t1;
737
+ $[6] = t2;
738
+ $[7] = t3;
739
+ } else t3 = $[7];
740
+ return t3;
541
741
  }
542
742
  /**
543
743
  * The line under a field: the error while there is one, the description
@@ -548,7 +748,11 @@ function FieldLabel({ state = NO_STATE, ...props }) {
548
748
  * field changing. The description steps aside for those too, which is what
549
749
  * the field's validation state is read for.
550
750
  */
551
- function FieldMessage({ characterCount = false, description, error, inset = true, maxLength }) {
751
+ function FieldMessage(t0) {
752
+ const $ = c(17);
753
+ const { characterCount: t1, description, error, inset: t2, maxLength } = t0;
754
+ const characterCount = t1 === void 0 ? false : t1;
755
+ const inset = t2 === void 0 ? true : t2;
552
756
  const validation = useContext(FieldErrorContext);
553
757
  const invalid = error !== void 0 || (validation?.isInvalid ?? false);
554
758
  const input = useSlottedContext(InputContext);
@@ -557,33 +761,71 @@ function FieldMessage({ characterCount = false, description, error, inset = true
557
761
  if (!invalid && description === void 0 && !characterCount && !insideForm) return null;
558
762
  const value = input?.value ?? textArea?.value ?? "";
559
763
  const length = String(value).length;
560
- return /* @__PURE__ */ jsxs("div", {
561
- ...{
764
+ let t3;
765
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
766
+ t3 = {
562
767
  0: { className: "x1w5n3ug x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x1pha0wt x78zum5 xxj4525 x1y88zpp x17jz683" },
563
768
  1: { className: "x1w5n3ug x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x1pha0wt x78zum5 xxj4525 x1y88zpp x17jz683 xboopgi" }
564
- }[!!inset << 0],
565
- children: [
566
- validation === null && error !== void 0 ? /* @__PURE__ */ jsx("span", {
567
- className: "x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x4ii1qj",
568
- children: error
569
- }) : /* @__PURE__ */ jsx(FieldError, {
570
- className: "x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x4ii1qj",
571
- children: error
572
- }),
573
- !invalid && description !== void 0 ? /* @__PURE__ */ jsx(Text, {
574
- slot: "description",
575
- className: "x1w5n3ug x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j",
576
- children: description
577
- }) : null,
578
- characterCount ? /* @__PURE__ */ jsx("span", {
579
- ...{
580
- 0: { className: "x1w5n3ug x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x2lah0s xss6m8b xvc5jky xuxw1ft" },
581
- 1: { className: "x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x2lah0s xss6m8b xvc5jky xuxw1ft x4ii1qj" }
582
- }[!!invalid << 0],
583
- children: maxLength === void 0 ? length : `${length}/${maxLength}`
584
- }) : null
585
- ]
586
- });
769
+ };
770
+ $[0] = t3;
771
+ } else t3 = $[0];
772
+ const t4 = t3[!!inset << 0];
773
+ let t5;
774
+ if ($[1] !== error || $[2] !== validation) {
775
+ t5 = validation === null && error !== void 0 ? /* @__PURE__ */ jsx("span", {
776
+ className: "x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x4ii1qj",
777
+ children: error
778
+ }) : /* @__PURE__ */ jsx(FieldError, {
779
+ className: "x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x4ii1qj",
780
+ children: error
781
+ });
782
+ $[1] = error;
783
+ $[2] = validation;
784
+ $[3] = t5;
785
+ } else t5 = $[3];
786
+ let t6;
787
+ if ($[4] !== description || $[5] !== invalid) {
788
+ t6 = !invalid && description !== void 0 ? /* @__PURE__ */ jsx(Text, {
789
+ slot: "description",
790
+ className: "x1w5n3ug x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j",
791
+ children: description
792
+ }) : null;
793
+ $[4] = description;
794
+ $[5] = invalid;
795
+ $[6] = t6;
796
+ } else t6 = $[6];
797
+ let t7;
798
+ if ($[7] !== characterCount || $[8] !== invalid || $[9] !== length || $[10] !== maxLength) {
799
+ t7 = characterCount ? /* @__PURE__ */ jsx("span", {
800
+ ...{
801
+ 0: { className: "x1w5n3ug x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x2lah0s xss6m8b xvc5jky xuxw1ft" },
802
+ 1: { className: "x1yicsit x1b35g6e x9d6959 xwth0xh xybisxh x10im51j x2lah0s xss6m8b xvc5jky xuxw1ft x4ii1qj" }
803
+ }[!!invalid << 0],
804
+ children: maxLength === void 0 ? length : `${length}/${maxLength}`
805
+ }) : null;
806
+ $[7] = characterCount;
807
+ $[8] = invalid;
808
+ $[9] = length;
809
+ $[10] = maxLength;
810
+ $[11] = t7;
811
+ } else t7 = $[11];
812
+ let t8;
813
+ if ($[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
814
+ t8 = /* @__PURE__ */ jsxs("div", {
815
+ ...t4,
816
+ children: [
817
+ t5,
818
+ t6,
819
+ t7
820
+ ]
821
+ });
822
+ $[12] = t4;
823
+ $[13] = t5;
824
+ $[14] = t6;
825
+ $[15] = t7;
826
+ $[16] = t8;
827
+ } else t8 = $[16];
828
+ return t8;
587
829
  }
588
830
  //#endregion
589
831
  export { FieldBox, FieldInput, FieldLabel, FieldMessage, FieldTextArea, FieldTrigger, FieldValue };