@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,5 +1,6 @@
1
1
  import { useRender } from "../../render/useRender.js";
2
2
  import { mergeStyles } from "../../styles/merge.js";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
5
  //#region src/components/supporting-pane/index.tsx
5
6
  /**
@@ -15,29 +16,99 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
16
  * Material Design asks of co-planar panes: focus order has to match the
16
17
  * arrangement on screen.
17
18
  */
18
- function SupportingPane({ main, placement = "trailing", render, supporting, ...props }) {
19
- const leading = placement === "leading";
20
- return useRender({
21
- defaultTagName: "div",
22
- props: {
23
- ...props,
24
- children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
19
+ function SupportingPane(t0) {
20
+ const $ = c(24);
21
+ let render;
22
+ let t1;
23
+ let t2;
24
+ let t3;
25
+ let t4;
26
+ let t5;
27
+ if ($[0] !== t0) {
28
+ const { main, placement: t6, render: t7, supporting, ...props } = t0;
29
+ render = t7;
30
+ const leading = (t6 === void 0 ? "trailing" : t6) === "leading";
31
+ t5 = useRender;
32
+ t4 = "div";
33
+ t1 = props;
34
+ let t8;
35
+ if ($[7] !== main) {
36
+ t8 = /* @__PURE__ */ jsx("div", {
25
37
  className: "x9f619 xeuugli",
26
38
  children: main
27
- }), /* @__PURE__ */ jsx("div", {
28
- ...{
29
- 0: { className: "x9f619 xeuugli" },
30
- 1: { className: "x9f619 xeuugli xm5moh1 x1mqhcjd x15daork x15qucf8" }
31
- }[!!leading << 0],
39
+ });
40
+ $[7] = main;
41
+ $[8] = t8;
42
+ } else t8 = $[8];
43
+ let t9;
44
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
45
+ t9 = {
46
+ 0: { className: "x9f619 xeuugli" },
47
+ 1: { className: "x9f619 xeuugli xm5moh1 x1mqhcjd x15daork x15qucf8" }
48
+ };
49
+ $[9] = t9;
50
+ } else t9 = $[9];
51
+ const t10 = t9[!!leading << 0];
52
+ let t11;
53
+ if ($[10] !== supporting || $[11] !== t10) {
54
+ t11 = /* @__PURE__ */ jsx("div", {
55
+ ...t10,
32
56
  children: supporting
33
- })] }),
34
- ...mergeStyles({
35
- 0: { className: "x9f619 xrvj5dj xj2l1yv x1mkdm3x x1674ulc" },
36
- 1: { className: "x9f619 xrvj5dj xj2l1yv x1mkdm3x xkgydl7" }
37
- }[!!leading << 0], props)
38
- },
39
- render
40
- });
57
+ });
58
+ $[10] = supporting;
59
+ $[11] = t10;
60
+ $[12] = t11;
61
+ } else t11 = $[12];
62
+ if ($[13] !== t11 || $[14] !== t8) {
63
+ t2 = /* @__PURE__ */ jsxs(Fragment, { children: [t8, t11] });
64
+ $[13] = t11;
65
+ $[14] = t8;
66
+ $[15] = t2;
67
+ } else t2 = $[15];
68
+ t3 = mergeStyles({
69
+ 0: { className: "x9f619 xrvj5dj xj2l1yv x1mkdm3x x1674ulc" },
70
+ 1: { className: "x9f619 xrvj5dj xj2l1yv x1mkdm3x xkgydl7" }
71
+ }[!!leading << 0], props);
72
+ $[0] = t0;
73
+ $[1] = render;
74
+ $[2] = t1;
75
+ $[3] = t2;
76
+ $[4] = t3;
77
+ $[5] = t4;
78
+ $[6] = t5;
79
+ } else {
80
+ render = $[1];
81
+ t1 = $[2];
82
+ t2 = $[3];
83
+ t3 = $[4];
84
+ t4 = $[5];
85
+ t5 = $[6];
86
+ }
87
+ let t6;
88
+ if ($[16] !== t1 || $[17] !== t2 || $[18] !== t3) {
89
+ t6 = {
90
+ ...t1,
91
+ children: t2,
92
+ ...t3
93
+ };
94
+ $[16] = t1;
95
+ $[17] = t2;
96
+ $[18] = t3;
97
+ $[19] = t6;
98
+ } else t6 = $[19];
99
+ let t7;
100
+ if ($[20] !== render || $[21] !== t4 || $[22] !== t6) {
101
+ t7 = {
102
+ defaultTagName: t4,
103
+ props: t6,
104
+ render
105
+ };
106
+ $[20] = render;
107
+ $[21] = t4;
108
+ $[22] = t6;
109
+ $[23] = t7;
110
+ } else t7 = $[23];
111
+ return t5(t7);
41
112
  }
42
113
  //#endregion
43
114
  export { SupportingPane as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/supporting-pane/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport type { RenderComponentProps } from '../../render/useRender';\nimport { useRender } from '../../render/useRender';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { media, spacing } from '../../tokens/design.tokens.stylex';\n\n// One of Material Design's canonical layouts. The supporting pane holds\n// content that only means anything next to the main pane — reviewer comments,\n// related items, a tool panel — which is what separates it from list-detail,\n// where the second pane stands on its own.\n//\n// The canonical layout page gives this layout two shapes across the\n// breakpoints, and both are reachable in CSS because neither depends on what\n// the reader selected: stacked at compact and medium, and from expanded up the\n// supporting pane beside the main one at a fixed 360, with the main pane\n// taking the rest. Stacking is Material Design's \"reflow\" strategy, where the\n// supporting pane moves under the main one rather than being dismissed. The\n// page's other compact option is a bottom sheet, which is a different\n// component's job — reach for Sheet at the call site when the supporting\n// content should be summoned rather than scrolled to.\n//\n// **Which side the supporting pane takes is an expanded-window choice, and\n// only that.** The page gives two rules: below the focus pane in medium\n// windows and under, and \"on the leading or trailing side of the focus pane\"\n// from expanded up. So `placement` moves the pane beside the main one and\n// leaves the stacked shape alone — stacked, the supporting pane is under the\n// main one either way.\n//\n// **A leading pane is placed with grid columns rather than by reordering the\n// DOM, and that is a departure worth naming.** The page also asks that focus\n// order match the arrangement on screen for co-planar panes, and no single\n// DOM order satisfies both of its rules: a supporting pane written first\n// reads left of the main one at expanded, as leading should, but then sits\n// above it when the layout stacks — which is the one thing the page says it\n// should not do. Whichever way it is written, one breakpoint has focus order\n// crossing the visual order.\n//\n// The main pane stays first in the DOM, so the break lands at expanded and\n// not on a phone. Side by side, a keyboard reaches the main pane before the\n// supporting one that is drawn to its left, which is an odd half-second with\n// both panes in view; stacked the other way round, a reader meets content\n// that \"only means anything next to the main pane\" before reaching the pane\n// it is talking about. The second is worse, and it is the case the page\n// rules on explicitly.\n\ntype SupportingPaneProps = Omit<RenderComponentProps<'div'>, 'children'> & {\n /**\n * The primary content. Takes whatever width the supporting pane leaves from\n * expanded up.\n */\n main?: ReactNode;\n /**\n * Which side of the main pane the supporting one takes from expanded up.\n * Below the medium breakpoint the layout stacks either way, with the\n * supporting pane under the main one.\n * @default 'trailing'\n */\n placement?: 'leading' | 'trailing';\n /**\n * Content that only means something beside `main`. Sits below it at compact\n * and medium, and beside it at a fixed 360px from expanded up.\n */\n supporting?: ReactNode;\n};\n\n/**\n * Material Design's supporting pane layout: a main pane and a companion that\n * reflows underneath it when there is no room beside it.\n *\n * Layout only — neither pane paints a surface or a border of its own, so what\n * goes in them is composed at the call site out of Cards, lists, or plain\n * content. `render` swaps the container's element, for a layout that should\n * be a `<main>` rather than a `<div>`.\n *\n * The panes are written to the DOM in the order they are shown, which is what\n * Material Design asks of co-planar panes: focus order has to match the\n * arrangement on screen.\n */\nfunction SupportingPane({\n main,\n placement = 'trailing',\n render,\n supporting,\n ...props\n}: SupportingPaneProps) {\n const leading = placement === 'leading';\n return useRender({\n defaultTagName: 'div',\n props: {\n ...props,\n children: <>\n <div className=\"x9f619 xeuugli\">{main}</div>\n <div {...{\n 0: {\n className: \"x9f619 xeuugli\"\n },\n 1: {\n className: \"x9f619 xeuugli xm5moh1 x1mqhcjd x15daork x15qucf8\"\n }\n }[!!leading << 0]}>\n {supporting}\n </div>\n </>,\n ...mergeStyles({\n 0: {\n className: \"x9f619 xrvj5dj xj2l1yv x1mkdm3x x1674ulc\"\n },\n 1: {\n className: \"x9f619 xrvj5dj xj2l1yv x1mkdm3x xkgydl7\"\n }\n }[!!leading << 0], props)\n },\n render\n });\n}\nexport type { SupportingPaneProps };\nexport default SupportingPane;"],"mappings":";;;;;;;;;;;;;;;;;AAgFA,SAAS,eAAe,EACtB,MACA,YAAY,YACZ,QACA,YACA,GAAG,SACmB;CACtB,MAAM,UAAU,cAAc;CAC9B,OAAO,UAAU;EACf,gBAAgB;EAChB,OAAO;GACL,GAAG;GACH,UAAU,qBAAA,UAAA,EAAA,UAAA,CACN,oBAAC,OAAD;IAAK,WAAU;IAAkB,UAAA;GAAU,CAAA,GAC3C,oBAAC,OAAD;IAAK,GAAI;KACT,GAAG,EACD,WAAW,iBACb;KACA,GAAG,EACD,WAAW,oDACb;IACF,EAAE,CAAC,CAAC,WAAW;IACV,UAAA;GACE,CAAA,CACP,EAAA,CAAA;GACF,GAAG,YAAY;IACb,GAAG,EACD,WAAW,2CACb;IACA,GAAG,EACD,WAAW,0CACb;GACF,EAAE,CAAC,CAAC,WAAW,IAAI,KAAK;EAC1B;EACA;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"index.js","names":["ReactNode","stylex","RenderComponentProps","useRender","mergeStyles","media","spacing","SupportingPaneProps","Omit","main","placement","supporting","SupportingPane","t0","$","_c","render","t1","t2","t3","t4","t5","t6","t7","props","undefined","leading","t8","t9","Symbol","for","0","className","1","t10","t11","children","defaultTagName"],"sources":["../../../src/components/supporting-pane/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport type { RenderComponentProps } from '../../render/useRender';\nimport { useRender } from '../../render/useRender';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { media, spacing } from '../../tokens/design.tokens.stylex';\n\n// One of Material Design's canonical layouts. The supporting pane holds\n// content that only means anything next to the main pane — reviewer comments,\n// related items, a tool panel — which is what separates it from list-detail,\n// where the second pane stands on its own.\n//\n// The canonical layout page gives this layout two shapes across the\n// breakpoints, and both are reachable in CSS because neither depends on what\n// the reader selected: stacked at compact and medium, and from expanded up the\n// supporting pane beside the main one at a fixed 360, with the main pane\n// taking the rest. Stacking is Material Design's \"reflow\" strategy, where the\n// supporting pane moves under the main one rather than being dismissed. The\n// page's other compact option is a bottom sheet, which is a different\n// component's job — reach for Sheet at the call site when the supporting\n// content should be summoned rather than scrolled to.\n//\n// **Which side the supporting pane takes is an expanded-window choice, and\n// only that.** The page gives two rules: below the focus pane in medium\n// windows and under, and \"on the leading or trailing side of the focus pane\"\n// from expanded up. So `placement` moves the pane beside the main one and\n// leaves the stacked shape alone — stacked, the supporting pane is under the\n// main one either way.\n//\n// **A leading pane is placed with grid columns rather than by reordering the\n// DOM, and that is a departure worth naming.** The page also asks that focus\n// order match the arrangement on screen for co-planar panes, and no single\n// DOM order satisfies both of its rules: a supporting pane written first\n// reads left of the main one at expanded, as leading should, but then sits\n// above it when the layout stacks — which is the one thing the page says it\n// should not do. Whichever way it is written, one breakpoint has focus order\n// crossing the visual order.\n//\n// The main pane stays first in the DOM, so the break lands at expanded and\n// not on a phone. Side by side, a keyboard reaches the main pane before the\n// supporting one that is drawn to its left, which is an odd half-second with\n// both panes in view; stacked the other way round, a reader meets content\n// that \"only means anything next to the main pane\" before reaching the pane\n// it is talking about. The second is worse, and it is the case the page\n// rules on explicitly.\n\ntype SupportingPaneProps = Omit<RenderComponentProps<'div'>, 'children'> & {\n /**\n * The primary content. Takes whatever width the supporting pane leaves from\n * expanded up.\n */\n main?: ReactNode;\n /**\n * Which side of the main pane the supporting one takes from expanded up.\n * Below the medium breakpoint the layout stacks either way, with the\n * supporting pane under the main one.\n * @default 'trailing'\n */\n placement?: 'leading' | 'trailing';\n /**\n * Content that only means something beside `main`. Sits below it at compact\n * and medium, and beside it at a fixed 360px from expanded up.\n */\n supporting?: ReactNode;\n};\n\n/**\n * Material Design's supporting pane layout: a main pane and a companion that\n * reflows underneath it when there is no room beside it.\n *\n * Layout only — neither pane paints a surface or a border of its own, so what\n * goes in them is composed at the call site out of Cards, lists, or plain\n * content. `render` swaps the container's element, for a layout that should\n * be a `<main>` rather than a `<div>`.\n *\n * The panes are written to the DOM in the order they are shown, which is what\n * Material Design asks of co-planar panes: focus order has to match the\n * arrangement on screen.\n */\nfunction SupportingPane({\n main,\n placement = 'trailing',\n render,\n supporting,\n ...props\n}: SupportingPaneProps) {\n const leading = placement === 'leading';\n return useRender({\n defaultTagName: 'div',\n props: {\n ...props,\n children: <>\n <div className=\"x9f619 xeuugli\">{main}</div>\n <div {...{\n 0: {\n className: \"x9f619 xeuugli\"\n },\n 1: {\n className: \"x9f619 xeuugli xm5moh1 x1mqhcjd x15daork x15qucf8\"\n }\n }[!!leading << 0]}>\n {supporting}\n </div>\n </>,\n ...mergeStyles({\n 0: {\n className: \"x9f619 xrvj5dj xj2l1yv x1mkdm3x x1674ulc\"\n },\n 1: {\n className: \"x9f619 xrvj5dj xj2l1yv x1mkdm3x xkgydl7\"\n }\n }[!!leading << 0], props)\n },\n render\n });\n}\nexport type { SupportingPaneProps };\nexport default SupportingPane;"],"mappings":";;;;;;;;;;;;;;;;;;AAgFA,SAAAY,eAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAP,EAAA,OAAAD,IAAA;EAAwB,MAAA,EAAAJ,MAAAC,WAAAY,IAAAN,QAAAO,IAAAZ,YAAA,GAAAa,UAAAX;EAAAG,SAAAO;EAOtB,MAAAG,WALAJ,OAAAG,KAAAA,IAAA,aAAAH,QAK8B;EACvBnB,KAAAA;EACWiB,KAAA;EAEXI,KAAAA;EAAK,IAAAG;EAAA,IAAAb,EAAA,OAAAL,MAAA;GAEJkB,KAAA,oB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AAG,MAAAH,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,IAAA;EAtBpBG,KAAA;GAAA,GACFE;GAAKY,UACElB;GAYL,GACFC;EAQL;EAACL,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAE,UAAAF,EAAA,QAAAM,MAAAN,EAAA,QAAAQ,IAAA;EAzBcC,KAAA;GAAAc,gBACCjB;GAAKI,OACdF;GAuBNN;EAEH;EAACF,EAAA,MAAAE;EAAAF,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OA3BMX,GAAUoB,EA2BhB;AAAC"}
@@ -4,9 +4,9 @@ import { CheckGlyph } from "../../glyphs/index.js";
4
4
  import { useRipple } from "../../hooks/useRipple.js";
5
5
  import { invalidFrom, useFieldValidationBehavior } from "../../field/root.js";
6
6
  import { FieldMessage } from "../../field/index.js";
7
+ import { c } from "react/compiler-runtime";
7
8
  import { useRef, useState } from "react";
8
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
- import { c } from "react/compiler-runtime";
10
10
  import { SwitchButton, SwitchField } from "react-aria-components";
11
11
  //#region src/components/switch/index.tsx
12
12
  const _temp = {
@@ -203,27 +203,72 @@ function buttonContent(children, icon, ripple, drag) {
203
203
  * The call site's `className` and `style` land on the field as a whole,
204
204
  * which is the element a layout positions.
205
205
  */
206
- function Switch({ children, description, error, icon = false, ...props }) {
206
+ function Switch(t0) {
207
+ const $ = c(20);
208
+ const { children, description, error, icon: t1, ...props } = t0;
209
+ const icon = t1 === void 0 ? false : t1;
207
210
  const ripple = useRipple();
208
211
  const drag = useHandleDrag();
209
212
  const validationBehavior = useFieldValidationBehavior();
210
- return /* @__PURE__ */ jsxs(SwitchField, {
211
- isInvalid: invalidFrom(error),
212
- validationBehavior,
213
- ...props,
214
- ...mergeStatefulStyles({ className: "x7a106z x9f619 xpr5407 xrvj5dj x1pmbctz" }, props),
215
- children: [/* @__PURE__ */ jsx(SwitchButton, {
213
+ const T0 = SwitchField;
214
+ let t2;
215
+ if ($[0] !== error) {
216
+ t2 = invalidFrom(error);
217
+ $[0] = error;
218
+ $[1] = t2;
219
+ } else t2 = $[1];
220
+ const t3 = mergeStatefulStyles({ className: "x7a106z x9f619 xpr5407 xrvj5dj x1pmbctz" }, props);
221
+ let t4;
222
+ if ($[2] !== children || $[3] !== drag || $[4] !== icon || $[5] !== ripple) {
223
+ t4 = buttonContent(children, icon, ripple, drag);
224
+ $[2] = children;
225
+ $[3] = drag;
226
+ $[4] = icon;
227
+ $[5] = ripple;
228
+ $[6] = t4;
229
+ } else t4 = $[6];
230
+ let t5;
231
+ if ($[7] !== t4) {
232
+ t5 = /* @__PURE__ */ jsx(SwitchButton, {
216
233
  className: "xjp7ctv",
217
- children: buttonContent(children, icon, ripple, drag)
218
- }), /* @__PURE__ */ jsx("div", {
234
+ children: t4
235
+ });
236
+ $[7] = t4;
237
+ $[8] = t5;
238
+ } else t5 = $[8];
239
+ let t6;
240
+ if ($[9] !== description || $[10] !== error) {
241
+ t6 = /* @__PURE__ */ jsx("div", {
219
242
  className: "x1xdureb",
220
243
  children: /* @__PURE__ */ jsx(FieldMessage, {
221
244
  description,
222
245
  error,
223
246
  inset: false
224
247
  })
225
- })]
226
- });
248
+ });
249
+ $[9] = description;
250
+ $[10] = error;
251
+ $[11] = t6;
252
+ } else t6 = $[11];
253
+ let t7;
254
+ if ($[12] !== T0 || $[13] !== props || $[14] !== t2 || $[15] !== t3 || $[16] !== t5 || $[17] !== t6 || $[18] !== validationBehavior) {
255
+ t7 = /* @__PURE__ */ jsxs(T0, {
256
+ isInvalid: t2,
257
+ validationBehavior,
258
+ ...props,
259
+ ...t3,
260
+ children: [t5, t6]
261
+ });
262
+ $[12] = T0;
263
+ $[13] = props;
264
+ $[14] = t2;
265
+ $[15] = t3;
266
+ $[16] = t5;
267
+ $[17] = t6;
268
+ $[18] = validationBehavior;
269
+ $[19] = t7;
270
+ } else t7 = $[19];
271
+ return t7;
227
272
  }
228
273
  /**
229
274
  * The handle following a pointer across the track, as the switch page draws
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["event","from"],"sources":["../../../src/components/switch/index.tsx"],"sourcesContent":["// React's event types are aliased because `useHandleDrag` also constructs a\n// DOM `PointerEvent`. Imported unaliased, the name shadows that constructor:\n// TypeScript still resolves the call to the global, since a type-only import\n// takes no value name, but a reader and a static analyser alike read it as\n// React's type, which has no runtime value behind it at all.\nimport type { MouseEvent as ReactMouseEvent, ReactNode, PointerEvent as ReactPointerEvent } from 'react';\nimport type { SwitchFieldProps as RACSwitchFieldProps, SwitchButtonRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useRef, useState } from 'react';\nimport { SwitchButton, SwitchField } from 'react-aria-components';\nimport { FieldMessage } from '../../field';\nimport { invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { CheckGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The switch page: a 52 by 32dp track with a 2dp outline and a full corner,\n// a handle that is 16dp off, 24dp on and 28dp while pressed, a 16dp icon in\n// the handle when asked for, a 40dp state layer around the handle and a 48dp\n// target. Off, the track is surface container highest inside an outline\n// rule and the handle is outline, turning on surface variant while hovered,\n// pressed or focused; on, the track is primary and the handle on primary,\n// turning primary container in the same states, with the icon in on primary\n// container. Disabled, the track and its rule are on surface at the\n// disabled container opacity and the handle on surface at the disabled\n// content opacity, or surface when on. The state layer is on surface off and\n// primary on.\n//\n// React Aria's `SwitchField` is the root, a div holding the description and\n// error slots; its `SwitchButton` is the label around a visually hidden\n// input, and everything drawn is that label's children, chosen from the\n// render state React Aria hands them. The field is the two-column grid the\n// checkbox uses, with the label `display: contents`, so the description and\n// error line up under the text.\n//\n// The handle travels between the two ends of the track and grows between\n// its three sizes on the same transition, `motion.durationShort2` with the\n// standard easing; the state layer and the ripple sit on a 40dp disc centred\n// on the handle, so they move with it. The adjacent label is body-large on\n// surface, which the page keeps the same whichever way the switch is.\n//\n// The page's pressed handle follows the pointer: it grows, travels with the\n// drag, and the switch flips when it is released past the middle of the\n// track or springs back when it is not. React Aria's `SwitchButton` has no\n// drag of its own, so the travel is this component's — see `useHandleDrag`.\nconst _temp = {\n kLqNvP: \"x1lxsm33\",\n \"$$css\": true\n};\nconst styles = {\n handle: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xp2scj5\",\n kZKoxP: \"xlup9mm\",\n kaIpWk: \"x3y1ksm\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"xscdzaa\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"x1kky2od\",\n kjj79g: \"xl56j7k\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x7okvu4\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n handleActive: {\n kWkggS: \"x1ccu2yh\",\n $$css: true\n },\n handleDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n handleOn: {\n kWkggS: \"x1ntwmx2\",\n kZKoxP: \"xxk0z11\",\n kzqmXN: \"xvy4d1p\",\n $$css: true\n },\n handleOnActive: {\n kWkggS: \"xp89om9\",\n $$css: true\n },\n handleOnDisabled: {\n kWkggS: \"x14s9m32\",\n kMwMTN: \"x1gpw424\",\n $$css: true\n },\n handlePressed: {\n kZKoxP: \"x1fgtraw\",\n kzqmXN: \"xgd8bvy\",\n $$css: true\n },\n layer: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x3y1ksm\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"x100vrsf\",\n kpwlN0: \"x1qx2jxi\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x15406qy\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n seat: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x1fgtraw\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"xgd8bvy\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x2hifos\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n seatAt: (offset: number) => [_temp, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(`${offset}px`)\n }],\n seatDragging: {\n kIyJzY: \"x1mq3mr6\",\n $$css: true\n },\n seatOn: {\n kLqNvP: \"x1n8ud3w\",\n $$css: true\n },\n track: {\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x10w6t97\",\n kVAM5u: \"x1fwvt7v\",\n kaIpWk: \"x3y1ksm\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xdh2fpr\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"xvni27\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xts7igz\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n trackDisabled: {\n kWkggS: \"x1trd85j\",\n kVAM5u: \"xrh88j3\",\n $$css: true\n },\n trackFocused: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n trackOn: {\n kWkggS: \"xnety89\",\n kVAM5u: \"x1uajy3w\",\n $$css: true\n },\n trackOnDisabled: {\n kWkggS: \"x19v6zzp\",\n kVAM5u: \"x9r1u3d\",\n $$css: true\n }\n};\n\n// The state layer over the handle: on surface while the switch is off and\n// primary while it is on, at the hover or the pressed opacity.\nconst hoverLayers = {\n off: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n on: {\n kWkggS: \"x659ado\",\n $$css: true\n }\n};\nconst pressedLayers = {\n off: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n on: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n }\n};\n\n// How far the seat travels: the track's 48dp inside its 2dp rule, less the\n// seat's own 28dp.\nconst TRAVEL = 20;\ntype Drag = ReturnType<typeof useHandleDrag>;\ntype Ripple = ReturnType<typeof useRipple<HTMLSpanElement>>;\ntype SwitchProps = {\n /**\n * The label, beside the switch. A switch that a row labels some other way\n * leaves it out and passes `aria-label` instead.\n */\n children?: ReactNode;\n /**\n * A hint under the label. Replaced by `error` when there is one, so the\n * two never stack.\n */\n description?: string;\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the switch in its error state — the message and `aria-invalid` follow\n * from it.\n */\n error?: string;\n /**\n * Draws the check in the handle while the switch is on, the page's\n * \"icon on selected switch\" form.\n * @default false\n */\n icon?: boolean;\n} & Omit<RACSwitchFieldProps, 'children' | 'isInvalid' | 'validationBehavior'>;\n\n// What the label draws, chosen from the render state React Aria hands it.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs. The ripple's handlers and surface go on the\n// state layer while the switch can change, and are left off while it\n// cannot, since a press that changes nothing should not look like one.\nfunction buttonContent(children: ReactNode, icon: boolean, ripple: Ripple, drag: Drag) {\n return (state: SwitchButtonRenderProps) => {\n const interactive = !state.isDisabled && !state.isReadOnly;\n const on = state.isSelected;\n const dragging = interactive && drag.offset !== null;\n const active = interactive && (state.isHovered || state.isPressed || state.isFocusVisible);\n return <>\n <span {...{\n 0: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x1ypdohk x78zum5 x2lah0s xvni27 xl56j7k\"\n },\n 2: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x78zum5 x2lah0s xvni27 xl56j7k xt0e3qv\"\n },\n 1: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x78zum5 x2lah0s xvni27 xl56j7k x1h6gzvc\"\n },\n 3: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x78zum5 x2lah0s xvni27 xl56j7k x1h6gzvc\"\n }\n }[!!state.isReadOnly << 1 | !!state.isDisabled << 0]}>\n <span {...stylex.props(styles.track, on && styles.trackOn, state.isDisabled && (on ? styles.trackOnDisabled : styles.trackDisabled), state.isFocusVisible && styles.trackFocused)}>\n <span {...interactive ? drag.handlers(on) : {}} {...stylex.props(styles.seat, on && styles.seatOn, dragging && styles.seatDragging, dragging && styles.seatAt(drag.offset ?? 0))}>\n <span {...interactive ? ripple.handlers : {}} {...stylex.props(styles.layer, interactive && state.isHovered && hoverLayers[on ? 'on' : 'off'], interactive && state.isPressed && pressedLayers[on ? 'on' : 'off'])}>\n {interactive ? ripple.surface : null}\n </span>\n <span {...stylex.props(styles.handle, on && styles.handleOn, active && (on ? styles.handleOnActive : styles.handleActive), (dragging || interactive && state.isPressed) && styles.handlePressed, state.isDisabled && (on ? styles.handleOnDisabled : styles.handleDisabled))}>\n {icon && on ? <CheckGlyph className=\"xlup9mm x1lliihq x1kky2od\" /> : null}\n </span>\n </span>\n </span>\n </span>\n {children === undefined ? null : <span {...{\n 0: {\n className: \"x9f619 x139gbkf x1ypdohk x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll\"\n },\n 2: {\n className: \"x9f619 x139gbkf x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll xt0e3qv\"\n },\n 1: {\n className: \"x9f619 x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll x1xj74d8 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll x1xj74d8 x1h6gzvc\"\n }\n }[!!state.isReadOnly << 1 | !!state.isDisabled << 0]}>\n {children}\n </span>}\n </>;\n };\n}\n\n/**\n * A switch that turns a setting on or off, with its label and optionally a\n * description or an error under it. Its state is React Aria's: pass\n * `isSelected` with `onChange` to control it, or `defaultSelected` to let it\n * keep its own. A switch takes effect as it is flipped, which is what sets\n * it apart from a checkbox in a form.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions.\n */\nfunction Switch({\n children,\n description,\n error,\n icon = false,\n ...props\n}: SwitchProps) {\n const ripple = useRipple<HTMLSpanElement>();\n const drag = useHandleDrag();\n const validationBehavior = useFieldValidationBehavior();\n return <SwitchField isInvalid={invalidFrom(error)} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles({\n className: \"x7a106z x9f619 xpr5407 xrvj5dj x1pmbctz\"\n }, props)}>\n <SwitchButton className=\"xjp7ctv\">\n {buttonContent(children, icon, ripple, drag)}\n </SwitchButton>\n <div className=\"x1xdureb\">\n <FieldMessage description={description} error={error} inset={false} />\n </div>\n </SwitchField>;\n}\n\n/**\n * The handle following a pointer across the track, as the switch page draws\n * a pressed switch. The seat's inset comes from the drag while one is under\n * way, and the switch settles from where the handle was let go: on past the\n * middle of the track, off before it.\n *\n * What flips the switch on an ordinary tap is React Aria's own press, which\n * ends on the pointer being released and pays no attention to where the\n * handle was dragged to — so a drag has to end that press before releasing,\n * which is what the pointer cancel is for, and settle the switch itself.\n * Settling means clicking the field's own input, the same element a tap\n * reaches in the end: the change goes through React Aria, and a controlled\n * switch stays controlled, since nothing here calls `onChange` or holds any\n * state of the switch's own. The click the pointer's release sends after\n * that is cancelled too, so nothing flips the switch a second time.\n *\n * A press that never moves is left alone entirely, so a tap flips the switch\n * as it did before.\n */\nfunction useHandleDrag() {\n const [offset, setOffset] = useState<null | number>(null);\n const origin = useRef<null | {\n base: number;\n on: boolean;\n rtl: boolean;\n x: number;\n }>(null);\n const settled = useRef<null | number>(null);\n const cancelClick = useRef(false);\n const onPointerCancel = useCallback(() => {\n origin.current = null;\n settled.current = null;\n setOffset(null);\n }, []);\n const onClickCapture = useCallback((event: ReactMouseEvent<HTMLSpanElement>) => {\n if (!cancelClick.current) {\n return;\n }\n cancelClick.current = false;\n // The label's activation is the browser's own, so this is what stops the\n // input being flipped by a drag that settled where it began.\n event.preventDefault();\n event.stopPropagation();\n }, []);\n const onPointerMove = useCallback((event: ReactPointerEvent<HTMLSpanElement>) => {\n const from = origin.current;\n if (from === null) {\n return;\n }\n const along = from.rtl ? from.x - event.clientX : event.clientX - from.x;\n const next = Math.min(TRAVEL, Math.max(0, from.base + along));\n settled.current = next;\n setOffset(next);\n }, []);\n const onPointerUp = useCallback((event: ReactPointerEvent<HTMLSpanElement>) => {\n const from = origin.current;\n const stopped = settled.current;\n const seat = event.currentTarget;\n origin.current = null;\n settled.current = null;\n setOffset(null);\n // A press that never moved is a tap, which React Aria flips on its own.\n if (from === null || stopped === null) {\n return;\n }\n // React Aria's press is about to flip the switch from wherever it\n // started, so it is cancelled first — a pointer cancel is what ends a\n // press without firing it — and the drag settles the switch instead.\n seat.dispatchEvent(new PointerEvent('pointercancel', {\n bubbles: true,\n pointerId: event.pointerId,\n pointerType: event.pointerType\n }));\n // The pointer's own click follows this, by which time the switch has\n // already settled.\n cancelClick.current = true;\n if (stopped > TRAVEL / 2 === from.on) {\n return;\n }\n const input = seat.closest('label')?.querySelector('input');\n input?.click();\n }, []);\n const handlers = useCallback((on: boolean) => ({\n onClickCapture,\n onPointerCancel,\n onPointerDown: (event: ReactPointerEvent<HTMLSpanElement>) => {\n if (event.pointerType === 'mouse' && event.button !== 0) {\n return;\n }\n origin.current = {\n base: on ? TRAVEL : 0,\n on,\n rtl: getComputedStyle(event.currentTarget).direction === 'rtl',\n x: event.clientX\n };\n settled.current = null;\n try {\n event.currentTarget.setPointerCapture(event.pointerId);\n } catch {\n // A pointer the browser is not tracking has no capture to take —\n // a synthetic event in a test, where the moves are dispatched on\n // this element anyway.\n }\n },\n onPointerMove,\n onPointerUp\n }), [onClickCapture, onPointerCancel, onPointerMove, onPointerUp]);\n return {\n handlers,\n offset\n };\n}\nexport type { SwitchProps };\nexport default Switch;"],"mappings":";;;;;;;;;;;AA+CA,MAAM,QAAQ;CACZ,QAAQ;CACR,SAAS;AACX;AACA,MAAM,SAAS;CACb,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,OAAO;CACT;CACA,kBAAkB;EAChB,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,eAAe;EACb,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS,WAAmB,CAAC,OAAO,EAClC,0BAAyB,QAAO,OAAO,QAAQ,WAAW,MAAM,OAAO,OAAO,OAAO,MAAM,KAAA,EAAA,CAAW,GAAG,OAAM,GAAI,EACrH,CAAC;CACD,cAAc;EACZ,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ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vent","ReactMouseEvent","ReactNode","PointerEvent","ReactPointerEvent","SwitchFieldProps","RACSwitchFieldProps","SwitchButtonRenderProps","stylex","useCallback","useRef","useState","SwitchButton","SwitchField","FieldMessage","invalidFrom","useFieldValidationBehavior","CheckGlyph","useRipple","mergeStatefulStyles","colors","motion","radii","spacing","stateLayerOpacity","typography","_temp","kLqNvP","styles","handle","kGNEyG","kWkggS","kZKoxP","kaIpWk","kB7OPa","kMwMTN","k1xSpc","kzqmXN","kjj79g","kIyJzY","k1ekBW","kAMwcw","$$css","handleActive","handleDisabled","handleOn","handleOnActive","handleOnDisabled","handlePressed","layer","kpwlN0","kVAEAm","seat","k87sOh","seatAt","offset","val","undefined","seatDragging","seatOn","track","kVAM5u","ksu8eU","kMzoRj","kmuXW","trackDisabled","trackFocused","kjBf7l","kInvED","k3XXqK","kMeerF","trackOn","trackOnDisabled","hoverLayers","off","on","pressedLayers","TRAVEL","Drag","ReturnType","useHandleDrag","Ripple","HTMLSpanElement","SwitchProps","children","description","error","icon","Omit","buttonContent","ripple","drag","state","interactive","isDisabled","isReadOnly","isSelected","dragging","active","isHovered","isPressed","isFocusVisible","className","props","handlers","surface","Switch","t0","$","_c","t1","validationBehavior","T0","t2","t3","t4","t5","t6","t7","setOffset","origin","settled","cancelClick","Symbol","for","current","onPointerCancel","event","preventDefault","stopPropagation","onClickCapture","event_0","from","along","rtl","x","clientX","next","Math","min","max","base","onPointerMove","event_1","from_0","stopped","currentTarget","dispatchEvent","bubbles","pointerId","pointerType","input","closest","querySelector","click","onPointerUp","onPointerDown","event_2","button","getComputedStyle","direction","setPointerCapture"],"sources":["../../../src/components/switch/index.tsx"],"sourcesContent":["// React's event types are aliased because `useHandleDrag` also constructs a\n// DOM `PointerEvent`. Imported unaliased, the name shadows that constructor:\n// TypeScript still resolves the call to the global, since a type-only import\n// takes no value name, but a reader and a static analyser alike read it as\n// React's type, which has no runtime value behind it at all.\nimport type { MouseEvent as ReactMouseEvent, ReactNode, PointerEvent as ReactPointerEvent } from 'react';\nimport type { SwitchFieldProps as RACSwitchFieldProps, SwitchButtonRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useRef, useState } from 'react';\nimport { SwitchButton, SwitchField } from 'react-aria-components';\nimport { FieldMessage } from '../../field';\nimport { invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { CheckGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The switch page: a 52 by 32dp track with a 2dp outline and a full corner,\n// a handle that is 16dp off, 24dp on and 28dp while pressed, a 16dp icon in\n// the handle when asked for, a 40dp state layer around the handle and a 48dp\n// target. Off, the track is surface container highest inside an outline\n// rule and the handle is outline, turning on surface variant while hovered,\n// pressed or focused; on, the track is primary and the handle on primary,\n// turning primary container in the same states, with the icon in on primary\n// container. Disabled, the track and its rule are on surface at the\n// disabled container opacity and the handle on surface at the disabled\n// content opacity, or surface when on. The state layer is on surface off and\n// primary on.\n//\n// React Aria's `SwitchField` is the root, a div holding the description and\n// error slots; its `SwitchButton` is the label around a visually hidden\n// input, and everything drawn is that label's children, chosen from the\n// render state React Aria hands them. The field is the two-column grid the\n// checkbox uses, with the label `display: contents`, so the description and\n// error line up under the text.\n//\n// The handle travels between the two ends of the track and grows between\n// its three sizes on the same transition, `motion.durationShort2` with the\n// standard easing; the state layer and the ripple sit on a 40dp disc centred\n// on the handle, so they move with it. The adjacent label is body-large on\n// surface, which the page keeps the same whichever way the switch is.\n//\n// The page's pressed handle follows the pointer: it grows, travels with the\n// drag, and the switch flips when it is released past the middle of the\n// track or springs back when it is not. React Aria's `SwitchButton` has no\n// drag of its own, so the travel is this component's — see `useHandleDrag`.\nconst _temp = {\n kLqNvP: \"x1lxsm33\",\n \"$$css\": true\n};\nconst styles = {\n handle: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xp2scj5\",\n kZKoxP: \"xlup9mm\",\n kaIpWk: \"x3y1ksm\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"xscdzaa\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"x1kky2od\",\n kjj79g: \"xl56j7k\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x7okvu4\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n handleActive: {\n kWkggS: \"x1ccu2yh\",\n $$css: true\n },\n handleDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n handleOn: {\n kWkggS: \"x1ntwmx2\",\n kZKoxP: \"xxk0z11\",\n kzqmXN: \"xvy4d1p\",\n $$css: true\n },\n handleOnActive: {\n kWkggS: \"xp89om9\",\n $$css: true\n },\n handleOnDisabled: {\n kWkggS: \"x14s9m32\",\n kMwMTN: \"x1gpw424\",\n $$css: true\n },\n handlePressed: {\n kZKoxP: \"x1fgtraw\",\n kzqmXN: \"xgd8bvy\",\n $$css: true\n },\n layer: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x3y1ksm\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"x100vrsf\",\n kpwlN0: \"x1qx2jxi\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x15406qy\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n seat: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x1fgtraw\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"xgd8bvy\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x2hifos\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n seatAt: (offset: number) => [_temp, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(`${offset}px`)\n }],\n seatDragging: {\n kIyJzY: \"x1mq3mr6\",\n $$css: true\n },\n seatOn: {\n kLqNvP: \"x1n8ud3w\",\n $$css: true\n },\n track: {\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x10w6t97\",\n kVAM5u: \"x1fwvt7v\",\n kaIpWk: \"x3y1ksm\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xdh2fpr\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"xvni27\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xts7igz\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n trackDisabled: {\n kWkggS: \"x1trd85j\",\n kVAM5u: \"xrh88j3\",\n $$css: true\n },\n trackFocused: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n trackOn: {\n kWkggS: \"xnety89\",\n kVAM5u: \"x1uajy3w\",\n $$css: true\n },\n trackOnDisabled: {\n kWkggS: \"x19v6zzp\",\n kVAM5u: \"x9r1u3d\",\n $$css: true\n }\n};\n\n// The state layer over the handle: on surface while the switch is off and\n// primary while it is on, at the hover or the pressed opacity.\nconst hoverLayers = {\n off: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n on: {\n kWkggS: \"x659ado\",\n $$css: true\n }\n};\nconst pressedLayers = {\n off: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n on: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n }\n};\n\n// How far the seat travels: the track's 48dp inside its 2dp rule, less the\n// seat's own 28dp.\nconst TRAVEL = 20;\ntype Drag = ReturnType<typeof useHandleDrag>;\ntype Ripple = ReturnType<typeof useRipple<HTMLSpanElement>>;\ntype SwitchProps = {\n /**\n * The label, beside the switch. A switch that a row labels some other way\n * leaves it out and passes `aria-label` instead.\n */\n children?: ReactNode;\n /**\n * A hint under the label. Replaced by `error` when there is one, so the\n * two never stack.\n */\n description?: string;\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the switch in its error state — the message and `aria-invalid` follow\n * from it.\n */\n error?: string;\n /**\n * Draws the check in the handle while the switch is on, the page's\n * \"icon on selected switch\" form.\n * @default false\n */\n icon?: boolean;\n} & Omit<RACSwitchFieldProps, 'children' | 'isInvalid' | 'validationBehavior'>;\n\n// What the label draws, chosen from the render state React Aria hands it.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs. The ripple's handlers and surface go on the\n// state layer while the switch can change, and are left off while it\n// cannot, since a press that changes nothing should not look like one.\nfunction buttonContent(children: ReactNode, icon: boolean, ripple: Ripple, drag: Drag) {\n return (state: SwitchButtonRenderProps) => {\n const interactive = !state.isDisabled && !state.isReadOnly;\n const on = state.isSelected;\n const dragging = interactive && drag.offset !== null;\n const active = interactive && (state.isHovered || state.isPressed || state.isFocusVisible);\n return <>\n <span {...{\n 0: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x1ypdohk x78zum5 x2lah0s xvni27 xl56j7k\"\n },\n 2: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x78zum5 x2lah0s xvni27 xl56j7k xt0e3qv\"\n },\n 1: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x78zum5 x2lah0s xvni27 xl56j7k x1h6gzvc\"\n },\n 3: {\n className: \"x6s0dn4 x1vqgdyp x9f619 x78zum5 x2lah0s xvni27 xl56j7k x1h6gzvc\"\n }\n }[!!state.isReadOnly << 1 | !!state.isDisabled << 0]}>\n <span {...stylex.props(styles.track, on && styles.trackOn, state.isDisabled && (on ? styles.trackOnDisabled : styles.trackDisabled), state.isFocusVisible && styles.trackFocused)}>\n <span {...interactive ? drag.handlers(on) : {}} {...stylex.props(styles.seat, on && styles.seatOn, dragging && styles.seatDragging, dragging && styles.seatAt(drag.offset ?? 0))}>\n <span {...interactive ? ripple.handlers : {}} {...stylex.props(styles.layer, interactive && state.isHovered && hoverLayers[on ? 'on' : 'off'], interactive && state.isPressed && pressedLayers[on ? 'on' : 'off'])}>\n {interactive ? ripple.surface : null}\n </span>\n <span {...stylex.props(styles.handle, on && styles.handleOn, active && (on ? styles.handleOnActive : styles.handleActive), (dragging || interactive && state.isPressed) && styles.handlePressed, state.isDisabled && (on ? styles.handleOnDisabled : styles.handleDisabled))}>\n {icon && on ? <CheckGlyph className=\"xlup9mm x1lliihq x1kky2od\" /> : null}\n </span>\n </span>\n </span>\n </span>\n {children === undefined ? null : <span {...{\n 0: {\n className: \"x9f619 x139gbkf x1ypdohk x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll\"\n },\n 2: {\n className: \"x9f619 x139gbkf x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll xt0e3qv\"\n },\n 1: {\n className: \"x9f619 x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll x1xj74d8 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x16svsjw x1848etk x1c52epr x1qn8t5l xh7dzej x1cmllll x1xj74d8 x1h6gzvc\"\n }\n }[!!state.isReadOnly << 1 | !!state.isDisabled << 0]}>\n {children}\n </span>}\n </>;\n };\n}\n\n/**\n * A switch that turns a setting on or off, with its label and optionally a\n * description or an error under it. Its state is React Aria's: pass\n * `isSelected` with `onChange` to control it, or `defaultSelected` to let it\n * keep its own. A switch takes effect as it is flipped, which is what sets\n * it apart from a checkbox in a form.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions.\n */\nfunction Switch({\n children,\n description,\n error,\n icon = false,\n ...props\n}: SwitchProps) {\n const ripple = useRipple<HTMLSpanElement>();\n const drag = useHandleDrag();\n const validationBehavior = useFieldValidationBehavior();\n return <SwitchField isInvalid={invalidFrom(error)} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles({\n className: \"x7a106z x9f619 xpr5407 xrvj5dj x1pmbctz\"\n }, props)}>\n <SwitchButton className=\"xjp7ctv\">\n {buttonContent(children, icon, ripple, drag)}\n </SwitchButton>\n <div className=\"x1xdureb\">\n <FieldMessage description={description} error={error} inset={false} />\n </div>\n </SwitchField>;\n}\n\n/**\n * The handle following a pointer across the track, as the switch page draws\n * a pressed switch. The seat's inset comes from the drag while one is under\n * way, and the switch settles from where the handle was let go: on past the\n * middle of the track, off before it.\n *\n * What flips the switch on an ordinary tap is React Aria's own press, which\n * ends on the pointer being released and pays no attention to where the\n * handle was dragged to — so a drag has to end that press before releasing,\n * which is what the pointer cancel is for, and settle the switch itself.\n * Settling means clicking the field's own input, the same element a tap\n * reaches in the end: the change goes through React Aria, and a controlled\n * switch stays controlled, since nothing here calls `onChange` or holds any\n * state of the switch's own. The click the pointer's release sends after\n * that is cancelled too, so nothing flips the switch a second time.\n *\n * A press that never moves is left alone entirely, so a tap flips the switch\n * as it did before.\n */\nfunction useHandleDrag() {\n const [offset, setOffset] = useState<null | number>(null);\n const origin = useRef<null | {\n base: number;\n on: boolean;\n rtl: boolean;\n x: number;\n }>(null);\n const settled = useRef<null | number>(null);\n const cancelClick = useRef(false);\n const onPointerCancel = useCallback(() => {\n origin.current = null;\n settled.current = null;\n setOffset(null);\n }, []);\n const onClickCapture = useCallback((event: ReactMouseEvent<HTMLSpanElement>) => {\n if (!cancelClick.current) {\n return;\n }\n cancelClick.current = false;\n // The label's activation is the browser's own, so this is what stops the\n // input being flipped by a drag that settled where it began.\n event.preventDefault();\n event.stopPropagation();\n }, []);\n const onPointerMove = useCallback((event: ReactPointerEvent<HTMLSpanElement>) => {\n const from = origin.current;\n if (from === null) {\n return;\n }\n const along = from.rtl ? from.x - event.clientX : event.clientX - from.x;\n const next = Math.min(TRAVEL, Math.max(0, from.base + along));\n settled.current = next;\n setOffset(next);\n }, []);\n const onPointerUp = useCallback((event: ReactPointerEvent<HTMLSpanElement>) => {\n const from = origin.current;\n const stopped = settled.current;\n const seat = event.currentTarget;\n origin.current = null;\n settled.current = null;\n setOffset(null);\n // A press that never moved is a tap, which React Aria flips on its own.\n if (from === null || stopped === null) {\n return;\n }\n // React Aria's press is about to flip the switch from wherever it\n // started, so it is cancelled first — a pointer cancel is what ends a\n // press without firing it — and the drag settles the switch instead.\n seat.dispatchEvent(new PointerEvent('pointercancel', {\n bubbles: true,\n pointerId: event.pointerId,\n pointerType: event.pointerType\n }));\n // The pointer's own click follows this, by which time the switch has\n // already settled.\n cancelClick.current = true;\n if (stopped > TRAVEL / 2 === from.on) {\n return;\n }\n const input = seat.closest('label')?.querySelector('input');\n input?.click();\n }, []);\n const handlers = useCallback((on: boolean) => ({\n onClickCapture,\n onPointerCancel,\n onPointerDown: (event: ReactPointerEvent<HTMLSpanElement>) => {\n if (event.pointerType === 'mouse' && event.button !== 0) {\n return;\n }\n origin.current = {\n base: on ? TRAVEL : 0,\n on,\n rtl: getComputedStyle(event.currentTarget).direction === 'rtl',\n x: event.clientX\n };\n settled.current = null;\n try {\n event.currentTarget.setPointerCapture(event.pointerId);\n } catch {\n // A pointer the browser is not tracking has no capture to take —\n // a synthetic event in a test, where the moves are dispatched on\n // this element anyway.\n }\n },\n onPointerMove,\n onPointerUp\n }), [onClickCapture, onPointerCancel, onPointerMove, onPointerUp]);\n return {\n handlers,\n offset\n };\n}\nexport type { SwitchProps };\nexport default Switch;"],"mappings":";;;;;;;;;;;AA+CA,MAAM0B,QAAQ;CACZC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZZ,QAAQ;EACRW,OAAO;CACT;CACAE,gBAAgB;EACdb,QAAQ;EACRW,OAAO;CACT;C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