@kanso-labs/kanso-ui 0.44.1 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +69 -18
  2. package/dist/chip/index.js +24 -4
  3. package/dist/chip/index.js.map +1 -1
  4. package/dist/chip/styles.js +13 -5
  5. package/dist/chip/styles.js.map +1 -1
  6. package/dist/components/app-bar/index.d.ts +14 -2
  7. package/dist/components/app-bar/index.js +36 -7
  8. package/dist/components/app-bar/index.js.map +1 -1
  9. package/dist/components/autocomplete/index.d.ts +44 -0
  10. package/dist/components/autocomplete/index.js +44 -0
  11. package/dist/components/autocomplete/index.js.map +1 -1
  12. package/dist/components/button/index.d.ts +3 -2
  13. package/dist/components/button/index.js +53 -59
  14. package/dist/components/button/index.js.map +1 -1
  15. package/dist/components/card/index.d.ts +11 -3
  16. package/dist/components/card/index.js +23 -1
  17. package/dist/components/card/index.js.map +1 -1
  18. package/dist/components/checkbox/index.js +65 -58
  19. package/dist/components/checkbox/index.js.map +1 -1
  20. package/dist/components/chip/index.d.ts +46 -30
  21. package/dist/components/chip/index.js +38 -17
  22. package/dist/components/chip/index.js.map +1 -1
  23. package/dist/components/chip-group/index.d.ts +5 -2
  24. package/dist/components/chip-group/index.js +8 -2
  25. package/dist/components/chip-group/index.js.map +1 -1
  26. package/dist/components/dialog/index.d.ts +27 -0
  27. package/dist/components/dialog/index.js +81 -37
  28. package/dist/components/dialog/index.js.map +1 -1
  29. package/dist/components/fab/index.d.ts +1 -1
  30. package/dist/components/fab/index.js.map +1 -1
  31. package/dist/components/form/index.d.ts +14 -4
  32. package/dist/components/form/index.js +6 -3
  33. package/dist/components/form/index.js.map +1 -1
  34. package/dist/components/icon-button/index.d.ts +15 -1
  35. package/dist/components/icon-button/index.js +15 -1
  36. package/dist/components/icon-button/index.js.map +1 -1
  37. package/dist/components/link/index.d.ts +4 -0
  38. package/dist/components/link/index.js +4 -0
  39. package/dist/components/link/index.js.map +1 -1
  40. package/dist/components/list/index.d.ts +34 -0
  41. package/dist/components/list/index.js +47 -13
  42. package/dist/components/list/index.js.map +1 -1
  43. package/dist/components/list-detail/index.d.ts +34 -1
  44. package/dist/components/list-detail/index.js +34 -1
  45. package/dist/components/list-detail/index.js.map +1 -1
  46. package/dist/components/list-item/index.d.ts +21 -2
  47. package/dist/components/list-item/index.js +6 -0
  48. package/dist/components/list-item/index.js.map +1 -1
  49. package/dist/components/menu/index.d.ts +6 -3
  50. package/dist/components/menu/index.js +3 -1
  51. package/dist/components/menu/index.js.map +1 -1
  52. package/dist/components/meter/index.d.ts +4 -0
  53. package/dist/components/meter/index.js +4 -0
  54. package/dist/components/meter/index.js.map +1 -1
  55. package/dist/components/navigation-bar/index.d.ts +14 -2
  56. package/dist/components/navigation-bar/index.js +14 -2
  57. package/dist/components/navigation-bar/index.js.map +1 -1
  58. package/dist/components/navigation-tree/index.js +2 -9
  59. package/dist/components/navigation-tree/index.js.map +1 -1
  60. package/dist/components/number-field/index.d.ts +7 -1
  61. package/dist/components/number-field/index.js +7 -1
  62. package/dist/components/number-field/index.js.map +1 -1
  63. package/dist/components/popover/index.d.ts +15 -1
  64. package/dist/components/popover/index.js +15 -1
  65. package/dist/components/popover/index.js.map +1 -1
  66. package/dist/components/product-icon/index.d.ts +8 -1
  67. package/dist/components/product-icon/index.js +8 -1
  68. package/dist/components/product-icon/index.js.map +1 -1
  69. package/dist/components/progress-indicator/index.d.ts +12 -6
  70. package/dist/components/progress-indicator/index.js +57 -46
  71. package/dist/components/progress-indicator/index.js.map +1 -1
  72. package/dist/components/radio-group/index.d.ts +7 -0
  73. package/dist/components/radio-group/index.js +23 -14
  74. package/dist/components/radio-group/index.js.map +1 -1
  75. package/dist/components/search-field/index.d.ts +13 -4
  76. package/dist/components/search-field/index.js +10 -4
  77. package/dist/components/search-field/index.js.map +1 -1
  78. package/dist/components/search-view/index.d.ts +2 -0
  79. package/dist/components/search-view/index.js.map +1 -1
  80. package/dist/components/segmented-button/index.d.ts +1 -1
  81. package/dist/components/segmented-button/index.js.map +1 -1
  82. package/dist/components/separator/index.d.ts +31 -6
  83. package/dist/components/separator/index.js +30 -6
  84. package/dist/components/separator/index.js.map +1 -1
  85. package/dist/components/sheet/index.d.ts +96 -37
  86. package/dist/components/sheet/index.js +420 -136
  87. package/dist/components/sheet/index.js.map +1 -1
  88. package/dist/components/snackbar/index.d.ts +8 -1
  89. package/dist/components/snackbar/index.js +7 -0
  90. package/dist/components/snackbar/index.js.map +1 -1
  91. package/dist/components/stack/index.d.ts +21 -5
  92. package/dist/components/stack/index.js +10 -0
  93. package/dist/components/stack/index.js.map +1 -1
  94. package/dist/components/switch/index.d.ts +12 -0
  95. package/dist/components/switch/index.js +12 -0
  96. package/dist/components/switch/index.js.map +1 -1
  97. package/dist/components/text-field/index.d.ts +39 -9
  98. package/dist/components/text-field/index.js +29 -7
  99. package/dist/components/text-field/index.js.map +1 -1
  100. package/dist/components/tree/index.js +11 -15
  101. package/dist/components/tree/index.js.map +1 -1
  102. package/dist/field/styles.js.map +1 -1
  103. package/dist/glyphs/index.js +19 -18
  104. package/dist/glyphs/index.js.map +1 -1
  105. package/dist/hooks/useBottomEdge.js +6 -3
  106. package/dist/hooks/useBottomEdge.js.map +1 -1
  107. package/dist/hooks/useRipple.js +216 -192
  108. package/dist/hooks/useRipple.js.map +1 -1
  109. package/dist/i18n/index.js +1 -0
  110. package/dist/i18n/index.js.map +1 -1
  111. package/dist/i18n/messages.js +34 -0
  112. package/dist/i18n/messages.js.map +1 -1
  113. package/dist/index.d.ts +3 -3
  114. package/dist/indicator/styles.js +7 -4
  115. package/dist/indicator/styles.js.map +1 -1
  116. package/dist/{tokens/theme.d.ts → kanso-ui-core/defaults-DMH0HWCw.d.ts} +3 -3
  117. package/dist/kanso-ui-core/glyphs.js +48 -0
  118. package/dist/kanso-ui-core/glyphs.js.map +1 -0
  119. package/dist/mark/styles.js +11 -5
  120. package/dist/mark/styles.js.map +1 -1
  121. package/dist/react-aria.d.ts +2 -2
  122. package/dist/row/index.js +90 -62
  123. package/dist/row/index.js.map +1 -1
  124. package/dist/row/styles.js +6 -1
  125. package/dist/row/styles.js.map +1 -1
  126. package/dist/styles/focus.js.map +1 -1
  127. package/dist/styles/overlay.js +8 -0
  128. package/dist/styles/overlay.js.map +1 -1
  129. package/dist/styles.css +135 -114
  130. package/dist/theme-scope.d.ts +15 -3
  131. package/dist/theme-scope.js +86 -98
  132. package/dist/theme-scope.js.map +1 -1
  133. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  134. package/dist/tokens/values.js.map +1 -1
  135. package/package.json +12 -10
package/dist/row/index.js CHANGED
@@ -16,82 +16,109 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
16
  * the same arrangement around a field.
17
17
  */
18
18
  function RowContent(t0) {
19
- const $ = c(34);
20
- const { children, isDisabled: t1, isEmphasized: t2, isSelected: t3, leading, overline, supporting, trailing, variant: t4 } = t0;
19
+ const $ = c(44);
20
+ const { chevron, children, isDisabled: t1, isEmphasized: t2, isSelected: t3, leading, overline, selection, supporting, trailing, variant: t4 } = t0;
21
21
  const isDisabled = t1 === void 0 ? false : t1;
22
22
  const isEmphasized = t2 === void 0 ? false : t2;
23
23
  const isSelected = t3 === void 0 ? false : t3;
24
24
  const variant = t4 === void 0 ? "list" : t4;
25
25
  const label = variant === "drawer" || variant === "menu";
26
+ let faded;
26
27
  let t5;
27
28
  let t6;
28
29
  let t7;
29
30
  let t8;
30
31
  let t9;
31
- if ($[0] !== children || $[1] !== isDisabled || $[2] !== isEmphasized || $[3] !== isSelected || $[4] !== label || $[5] !== leading || $[6] !== overline || $[7] !== supporting || $[8] !== variant) {
32
+ if ($[0] !== chevron || $[1] !== children || $[2] !== isDisabled || $[3] !== isEmphasized || $[4] !== isSelected || $[5] !== label || $[6] !== leading || $[7] !== overline || $[8] !== selection || $[9] !== supporting || $[10] !== variant) {
32
33
  const tone = supportingTone(variant, {
33
34
  isDisabled,
34
35
  isSelected
35
36
  });
36
- if ($[14] !== leading) {
37
- t9 = !hasContent(leading) ? null : /* @__PURE__ */ jsx("span", {
38
- ...props(rowStyles.slot),
37
+ faded = isDisabled && rowStyles.slotDisabled;
38
+ let t10;
39
+ if ($[17] !== faded || $[18] !== leading) {
40
+ t10 = !hasContent(leading) ? null : /* @__PURE__ */ jsx("span", {
41
+ ...props(rowStyles.slot, faded),
39
42
  children: leading
40
43
  });
41
- $[14] = leading;
42
- $[15] = t9;
43
- } else t9 = $[15];
44
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
44
+ $[17] = faded;
45
+ $[18] = leading;
46
+ $[19] = t10;
47
+ } else t10 = $[19];
48
+ const leadingSlot = t10;
49
+ if ($[20] !== chevron || $[21] !== faded || $[22] !== leadingSlot || $[23] !== selection) {
50
+ t9 = !hasContent(chevron) && !hasContent(selection) ? leadingSlot : /* @__PURE__ */ jsxs("span", {
51
+ ...props(rowStyles.slot),
52
+ children: [
53
+ !hasContent(chevron) ? null : /* @__PURE__ */ jsx("span", {
54
+ ...props(rowStyles.slot, faded),
55
+ children: chevron
56
+ }),
57
+ selection,
58
+ leadingSlot
59
+ ]
60
+ });
61
+ $[20] = chevron;
62
+ $[21] = faded;
63
+ $[22] = leadingSlot;
64
+ $[23] = selection;
65
+ $[24] = t9;
66
+ } else t9 = $[24];
67
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
45
68
  t5 = props(rowStyles.main);
46
- $[16] = t5;
47
- } else t5 = $[16];
69
+ $[25] = t5;
70
+ } else t5 = $[25];
48
71
  t6 = !hasContent(overline) ? null : /* @__PURE__ */ jsx("span", {
49
72
  ...props(rowStyles.overline, tone),
50
73
  children: overline
51
74
  });
52
- let t10;
53
- if ($[17] !== isEmphasized || $[18] !== label) {
54
- t10 = props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis);
55
- $[17] = isEmphasized;
56
- $[18] = label;
57
- $[19] = t10;
58
- } else t10 = $[19];
59
- if ($[20] !== children || $[21] !== t10) {
75
+ let t11;
76
+ if ($[26] !== isEmphasized || $[27] !== label) {
77
+ t11 = props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis);
78
+ $[26] = isEmphasized;
79
+ $[27] = label;
80
+ $[28] = t11;
81
+ } else t11 = $[28];
82
+ if ($[29] !== children || $[30] !== t11) {
60
83
  t7 = /* @__PURE__ */ jsx("span", {
61
- ...t10,
84
+ ...t11,
62
85
  children
63
86
  });
64
- $[20] = children;
65
- $[21] = t10;
66
- $[22] = t7;
67
- } else t7 = $[22];
87
+ $[29] = children;
88
+ $[30] = t11;
89
+ $[31] = t7;
90
+ } else t7 = $[31];
68
91
  t8 = !hasContent(supporting) ? null : /* @__PURE__ */ jsx("span", {
69
92
  ...props(rowStyles.supporting, tone),
70
93
  children: supporting
71
94
  });
72
- $[0] = children;
73
- $[1] = isDisabled;
74
- $[2] = isEmphasized;
75
- $[3] = isSelected;
76
- $[4] = label;
77
- $[5] = leading;
78
- $[6] = overline;
79
- $[7] = supporting;
80
- $[8] = variant;
81
- $[9] = t5;
82
- $[10] = t6;
83
- $[11] = t7;
84
- $[12] = t8;
85
- $[13] = t9;
95
+ $[0] = chevron;
96
+ $[1] = children;
97
+ $[2] = isDisabled;
98
+ $[3] = isEmphasized;
99
+ $[4] = isSelected;
100
+ $[5] = label;
101
+ $[6] = leading;
102
+ $[7] = overline;
103
+ $[8] = selection;
104
+ $[9] = supporting;
105
+ $[10] = variant;
106
+ $[11] = faded;
107
+ $[12] = t5;
108
+ $[13] = t6;
109
+ $[14] = t7;
110
+ $[15] = t8;
111
+ $[16] = t9;
86
112
  } else {
87
- t5 = $[9];
88
- t6 = $[10];
89
- t7 = $[11];
90
- t8 = $[12];
91
- t9 = $[13];
113
+ faded = $[11];
114
+ t5 = $[12];
115
+ t6 = $[13];
116
+ t7 = $[14];
117
+ t8 = $[15];
118
+ t9 = $[16];
92
119
  }
93
120
  let t10;
94
- if ($[23] !== t5 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8) {
121
+ if ($[32] !== t5 || $[33] !== t6 || $[34] !== t7 || $[35] !== t8) {
95
122
  t10 = /* @__PURE__ */ jsxs("span", {
96
123
  ...t5,
97
124
  children: [
@@ -100,33 +127,34 @@ function RowContent(t0) {
100
127
  t8
101
128
  ]
102
129
  });
103
- $[23] = t5;
104
- $[24] = t6;
105
- $[25] = t7;
106
- $[26] = t8;
107
- $[27] = t10;
108
- } else t10 = $[27];
130
+ $[32] = t5;
131
+ $[33] = t6;
132
+ $[34] = t7;
133
+ $[35] = t8;
134
+ $[36] = t10;
135
+ } else t10 = $[36];
109
136
  let t11;
110
- if ($[28] !== trailing) {
137
+ if ($[37] !== faded || $[38] !== trailing) {
111
138
  t11 = !hasContent(trailing) ? null : /* @__PURE__ */ jsx("span", {
112
- ...props(rowStyles.slot),
139
+ ...props(rowStyles.slot, faded),
113
140
  children: trailing
114
141
  });
115
- $[28] = trailing;
116
- $[29] = t11;
117
- } else t11 = $[29];
142
+ $[37] = faded;
143
+ $[38] = trailing;
144
+ $[39] = t11;
145
+ } else t11 = $[39];
118
146
  let t12;
119
- if ($[30] !== t10 || $[31] !== t11 || $[32] !== t9) {
147
+ if ($[40] !== t10 || $[41] !== t11 || $[42] !== t9) {
120
148
  t12 = /* @__PURE__ */ jsxs(Fragment, { children: [
121
149
  t9,
122
150
  t10,
123
151
  t11
124
152
  ] });
125
- $[30] = t10;
126
- $[31] = t11;
127
- $[32] = t9;
128
- $[33] = t12;
129
- } else t12 = $[33];
153
+ $[40] = t10;
154
+ $[41] = t11;
155
+ $[42] = t9;
156
+ $[43] = t12;
157
+ } else t12 = $[43];
130
158
  return t12;
131
159
  }
132
160
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","stylex","hasContent","rowStyles","supportingTone","RowContentProps","children","isDisabled","isEmphasized","isSelected","leading","overline","supporting","trailing","variant","RowVariant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","t5","t6","t7","t8","t9","tone","props","slot","Symbol","for","main","t10","headlineMenu","headlineList","headlineEmphasis","t11","t12","_c","stylex.props"],"sources":["../../src/row/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { hasContent } from '../render/content';\nimport { rowStyles, supportingTone } from './styles';\ninterface RowContentProps {\n /** The row's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /**\n * Whether the row is disabled. The supporting line takes the row's own\n * faded colour when it is, rather than staying at full strength in the\n * muted role.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Whether the headline is drawn heavier than its variant's own weight, for\n * a row marked without the container a selected one takes. The navigation\n * drawer's trail to the current row is what asks for it.\n * @default false\n */\n isEmphasized?: boolean;\n /**\n * Whether the row is selected. The supporting line takes the selected\n * container's own content role when it is, rather than staying in the\n * muted role it draws on the surface.\n * @default false\n */\n isSelected?: boolean;\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes.\n */\n overline?: ReactNode;\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n /**\n * Which spec page's row this is. A list item's headline is body-large; a\n * menu item's label and a navigation drawer row's are label-large. The\n * element around the content applies the matching `rowStyles.list`,\n * `rowStyles.menu` or `rowStyles.drawer` beside `rowStyles.base`.\n * @default 'list'\n */\n variant?: RowVariant;\n}\ntype RowVariant = 'drawer' | 'list' | 'menu';\n\n/**\n * The inside of a row: the leading slot, the headline with its supporting\n * line, and the trailing slot, each rendered only when given. The element\n * around it is the caller's — ListItem's div or button, a collection's item —\n * and takes `rowStyles.base`, the variant's own style, and whichever states\n * apply; this is what every one of them puts inside it, so a list, a menu, a\n * tree and a drawer draw the same row.\n *\n * Not a component of the library's own and not exported; see `src/field` for\n * the same arrangement around a field.\n */\nfunction RowContent({\n children,\n isDisabled = false,\n isEmphasized = false,\n isSelected = false,\n leading,\n overline,\n supporting,\n trailing,\n variant = 'list'\n}: RowContentProps) {\n // The drawer's label is the menu's, so the two share the headline style;\n // what they do not share is the container a selected row brings, which is\n // why the tone below still asks which variant this is.\n const label = variant === 'drawer' || variant === 'menu';\n const tone = supportingTone(variant, {\n isDisabled,\n isSelected\n });\n return <>\n {!hasContent(leading) ? null : <span {...stylex.props(rowStyles.slot)}>{leading}</span>}\n <span {...stylex.props(rowStyles.main)}>\n {!hasContent(overline) ? null : <span {...stylex.props(rowStyles.overline, tone)}>{overline}</span>}\n <span {...stylex.props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis)}>\n {children}\n </span>\n {!hasContent(supporting) ? null : <span {...stylex.props(rowStyles.supporting, tone)}>\n {supporting}\n </span>}\n </span>\n {!hasContent(trailing) ? null : <span {...stylex.props(rowStyles.slot)}>{trailing}</span>}\n </>;\n}\nexport type { RowContentProps, RowVariant };\nexport { RowContent };"],"mappings":";;;;;;;;;;;;;;;;;AA6DA,SAAAgB,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAb,UAAAC,YAAAa,IAAAZ,cAAAa,IAAAZ,YAAAa,IAAAZ,SAAAC,UAAAC,YAAAC,UAAAC,SAAAS,OAAAN;CAElB,MAAAV,aAAAa,OAAAI,KAAAA,IAAA,QAAAJ;CACA,MAAAZ,eAAAa,OAAAG,KAAAA,IAAA,QAAAH;CACA,MAAAZ,aAAAa,OAAAE,KAAAA,IAAA,QAAAF;CAKA,MAAAR,UAAAS,OAAAC,KAAAA,IAAA,SAAAD;CAKA,MAAAE,QAAcX,YAAY,YAAYA,YAAY;CAAO,IAAAY;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAZ,EAAA,OAAAZ,YAAAY,EAAA,OAAAX,cAAAW,EAAA,OAAAV,gBAAAU,EAAA,OAAAT,cAAAS,E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B,EAAA,MAAAY;EAAAZ,EAAA,MAAAwB;CAAA,OAAAA,MAAAxB,EAAA;CAAA,OAZEwB;AAYF"}
1
+ {"version":3,"file":"index.js","names":["ReactNode","stylex","hasContent","rowStyles","supportingTone","RowContentProps","chevron","children","isDisabled","isEmphasized","isSelected","leading","overline","selection","supporting","trailing","variant","RowVariant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","faded","t5","t6","t7","t8","t9","tone","slotDisabled","t10","props","slot","leadingSlot","Symbol","for","main","t11","headlineMenu","headlineList","headlineEmphasis","t12","_c","stylex.props"],"sources":["../../src/row/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { hasContent } from '../render/content';\nimport { rowStyles, supportingTone } from './styles';\ninterface RowContentProps {\n /**\n * The caret a tree row opens with, ahead of `selection` and `leading`.\n * Faded with `leading` while the row is disabled.\n */\n chevron?: ReactNode;\n /** The row's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /**\n * Whether the row is disabled. The supporting line takes the row's own\n * faded colour when it is, rather than staying at full strength in the\n * muted role, and the leading and trailing content fades with it.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Whether the headline is drawn heavier than its variant's own weight, for\n * a row marked without the container a selected one takes. The navigation\n * drawer's trail to the current row is what asks for it.\n * @default false\n */\n isEmphasized?: boolean;\n /**\n * Whether the row is selected. The supporting line takes the selected\n * container's own content role when it is, rather than staying in the\n * muted role it draws on the surface.\n * @default false\n */\n isSelected?: boolean;\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes.\n */\n overline?: ReactNode;\n /**\n * The checkbox a selecting row draws, between `chevron` and `leading`.\n * React Aria disables it with the row and it draws that state itself, so\n * it stays out of the fade the rest of the slot takes rather than fading\n * twice.\n */\n selection?: ReactNode;\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n /**\n * Which spec page's row this is. A list item's headline is body-large; a\n * menu item's label and a navigation drawer row's are label-large. The\n * element around the content applies the matching `rowStyles.list`,\n * `rowStyles.menu` or `rowStyles.drawer` beside `rowStyles.base`.\n * @default 'list'\n */\n variant?: RowVariant;\n}\ntype RowVariant = 'drawer' | 'list' | 'menu';\n\n/**\n * The inside of a row: the leading slot, the headline with its supporting\n * line, and the trailing slot, each rendered only when given. The element\n * around it is the caller's — ListItem's div or button, a collection's item —\n * and takes `rowStyles.base`, the variant's own style, and whichever states\n * apply; this is what every one of them puts inside it, so a list, a menu, a\n * tree and a drawer draw the same row.\n *\n * Not a component of the library's own and not exported; see `src/field` for\n * the same arrangement around a field.\n */\nfunction RowContent({\n chevron,\n children,\n isDisabled = false,\n isEmphasized = false,\n isSelected = false,\n leading,\n overline,\n selection,\n supporting,\n trailing,\n variant = 'list'\n}: RowContentProps) {\n // The drawer's label is the menu's, so the two share the headline style;\n // what they do not share is the container a selected row brings, which is\n // why the tone below still asks which variant this is.\n const label = variant === 'drawer' || variant === 'menu';\n const tone = supportingTone(variant, {\n isDisabled,\n isSelected\n });\n const faded = isDisabled && rowStyles.slotDisabled;\n const leadingSlot = !hasContent(leading) ? null : <span {...stylex.props(rowStyles.slot, faded)}>{leading}</span>;\n return <>\n {/*\n * The caret, the checkbox and the leading content share one slot, with\n * nothing between them, so a column of rows lines each of them up. The\n * two that fade are slots of their own inside it.\n */}\n {!hasContent(chevron) && !hasContent(selection) ? leadingSlot : <span {...stylex.props(rowStyles.slot)}>\n {!hasContent(chevron) ? null : <span {...stylex.props(rowStyles.slot, faded)}>{chevron}</span>}\n {selection}\n {leadingSlot}\n </span>}\n <span {...stylex.props(rowStyles.main)}>\n {!hasContent(overline) ? null : <span {...stylex.props(rowStyles.overline, tone)}>{overline}</span>}\n <span {...stylex.props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis)}>\n {children}\n </span>\n {!hasContent(supporting) ? null : <span {...stylex.props(rowStyles.supporting, tone)}>\n {supporting}\n </span>}\n </span>\n {!hasContent(trailing) ? null : <span {...stylex.props(rowStyles.slot, faded)}>{trailing}</span>}\n </>;\n}\nexport type { RowContentProps, RowVariant };\nexport { RowContent };"],"mappings":";;;;;;;;;;;;;;;;;AAyEA,SAAAkB,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAf,SAAAC,UAAAC,YAAAc,IAAAb,cAAAc,IAAAb,YAAAc,IAAAb,SAAAC,UAAAC,WAAAC,YAAAC,UAAAC,SAAAS,OAAAN;CAGlB,MAAAX,aAAAc,OAAAI,KAAAA,IAAA,QAAAJ;CACA,MAAAb,eAAAc,OAAAG,KAAAA,IAAA,QAAAH;CACA,MAAAb,aAAAc,OAAAE,KAAAA,IAAA,QAAAF;CAMA,MAAAR,UAAAS,OAAAC,KAAAA,IAAA,SAAAD;CAKA,MAAAE,QAAcX,YAAY,YAAYA,YAAY;CAAO,IAAAY;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAb,EAAA,OAAAd,WAAAc,EAAA,OAAAb,YAAAa,EAAA,OAAAZ,cAAAY,EAAA,OAAAX,gBAAAW,EAAA,OAAAV,cAAAU,EAAA,OAAAO,SAAAP,EAAA,OAAAT,WAAAS,EAAA,OAAAR,YAAAQ,EAAA,OAAAP,aAAAO,EAAA,OAAAN,cAAAM,EAAA,QAAAJ,SAAA;EACzD,MAAAkB,OAAa9B,eAAeY,SAAS;GAAAR;GAAAE;EAGrC,CAAC;EACDkB,QAAcpB,cAAcL,UAASgC;EAAc,IAAAC;EAAA,IAAAhB,EAAA,QAAAQ,SAAAR,EAAA,QAAAT,SAAA;GAC/ByB,MAAA,CAAClC,WAAWS,OAAO,IAAnB,OAA8B,oBAAA,QAAA;IAA+D,GAArDV,MAAaE,UAASmC,MAAOV,KAAK;IAAIjB,UAAAA;GAAe,CAA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Dd,MAAaE,UAASmC,MAAOV,KAAK;GAAIb,UAAAA;EAAgB,CAAA;EAAAK,EAAA,MAAAQ;EAAAR,EAAA,MAAAL;EAAAK,EAAA,MAAAuB;CAAA,OAAAA,MAAAvB,EAAA;CAAA,IAAA2B;CAAA,IAAA3B,EAAA,QAAAgB,OAAAhB,EAAA,QAAAuB,OAAAvB,EAAA,QAAAa,IAAA;EApB7Fc,MAAA,qBAAA,UAAA,EAAA,UAAA;GAMFd;GAKDG;GASCO;EAA+F,EAAA,CAAA;EAC/FvB,EAAA,MAAAgB;EAAAhB,EAAA,MAAAuB;EAAAvB,EAAA,MAAAa;EAAAb,EAAA,MAAA2B;CAAA,OAAAA,MAAA3B,EAAA;CAAA,OArBE2B;AAqBF"}
@@ -96,7 +96,7 @@ const rowStyles = {
96
96
  $$css: true
97
97
  },
98
98
  interactiveLayers: {
99
- kWkggS: "x83qkoq x1yl1wq7 xjqqt44 xjbqb8w",
99
+ kWkggS: "x83qkoq x1yl1wq7 x10oam47 xkl27de xjqqt44 xjbqb8w",
100
100
  $$css: true
101
101
  },
102
102
  list: {
@@ -153,6 +153,11 @@ const rowStyles = {
153
153
  kmuXW: "x2lah0s",
154
154
  $$css: true
155
155
  },
156
+ slotDisabled: {
157
+ kMwMTN: "x139gbkf x1bhcspo",
158
+ kSiTet: "x1ppv7y9 x1tbh5bv",
159
+ $$css: true
160
+ },
156
161
  supporting: {
157
162
  kMwMTN: "x1w5n3ug",
158
163
  kMv6JI: "xpo2rfv",
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","RowVariant","colors","radii","shadows","sizing","spacing","stateLayerOpacity","typography","HOVER_CAPABLE","FORCED_COLORS","rowStyles","base","kGNEyG","kWkggS","kMzoRj","kB7OPa","kMwMTN","k1xSpc","kOIVth","kzqmXN","k8WAf4","kg3NbH","kVAEAm","k9WMMc","kMnn75","$$css","disabled","kkrTdU","kAXs8y","dragging","kKwaWg","kGVxlE","kY2c9j","drawer","kaIpWk","kUOVxO","kAzted","drawerSurface","dropTarget","kjBf7l","kInvED","k3XXqK","kMeerF","focusVisible","headlineEmphasis","k63SB2","headlineList","kMv6JI","kGuDYH","kb6lSQ","kLWn49","kHjlTd","headlineMenu","hovered","interactive","kVVagm","interactiveLayers","list","main","kXwgrk","kzQI83","k7Eaqz","menu","overline","pressed","selectedDrawer","selectedList","selectedMenu","slot","kmuXW","supporting","supportingInherit","supportingSelectedDrawer","supportingSelectedList","supportingSelectedMenu","threeLine","twoLine","supportingTone","variant","isDisabled","isSelected"],"sources":["../../src/row/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport type { RowVariant } from '.';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The row every list draws: ListItem's, and from here on the item of every\n// collection the coverage plan adds — ListBox, Menu, List, Tree, the options\n// of Select and ComboBox. Apart from the RowContent component in ./index.tsx\n// so that file exports components alone, which is what keeps fast refresh\n// working for it.\n//\n// Three variants, because three spec pages draw three rows. The lists page\n// gives a list item a 56dp floor, a body-large headline and a body-medium\n// supporting line, and primary container when selected. The menus page gives\n// a menu item 48dp, a label-large label, and tertiary container when\n// selected. The navigation drawer page gives its row 56dp too, with a\n// label-large label like a menu's, and marks the current one with a\n// secondary-container pill held 12dp off each edge — 336dp of indicator in a\n// 360dp container, which is what that inset comes to. The layout, the\n// padding, the state layers and the disabled treatment are one row; `list`,\n// `menu` and `drawer` carry only what the three pages disagree on, and a\n// consumer applies one of them beside `base`.\n//\n// The block padding is the lists page's 8dp, which is what puts a row's\n// 40dp leading element — an avatar, a selection checkbox — on the 56dp\n// one-line height, and a 56dp one on 72. The page pads a three-line row 12dp\n// instead, which `threeLine` carries. A menu item and a drawer row hold one\n// line of text inside a taller floor, so their padding shows only on a label\n// that wraps.\n//\n// Laid out with flex rather than the grid the design draws. The design's\n// three columns are `auto 1fr auto`, which is what flex does natively — and\n// unlike a fixed three-column grid it stays correct when a row has no leading\n// or no trailing content, where the remaining children would otherwise slide\n// into the wrong columns.\n//\n// Rows align with each other through their leading content being the same\n// size, not through a fixed column width: a list of Avatars all at one size\n// lines up, and that is the same thing the design's 40px column achieves.\n//\n// The state layer composites over `transparent` rather than over a container\n// colour, because a row's own background is transparent and it therefore\n// tints whatever it happens to be sitting on — a card, a menu, or the page.\n// The two selected states are the ones that bring a container of their own.\n\n// A pointer that can hover, for `interactiveLayers` — a plain element with no\n// render state, so its hover layer is a pseudo-class, and Chromium leaves\n// `:hover` on whatever a touch last tapped. Inside this query a touch screen\n// draws no hover at all; a touchscreen laptop still matches it for its\n// trackpad.\nconst HOVER_CAPABLE = '@media (hover: hover)';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst rowStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf xs5hli\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x1yc453h\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n dragging: {\n kWkggS: \"x14s9m32\",\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x4r79n0\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n drawer: {\n kaIpWk: \"x1dkaolv\",\n kzqmXN: \"x14atkfc\",\n kUOVxO: \"xd2r6sq\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n drawerSurface: {\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"xjp7ctv\",\n $$css: true\n },\n dropTarget: {\n kKwaWg: \"xu73ib2\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n focusVisible: {\n kKwaWg: \"x17vw94z\",\n kjBf7l: \"xrgy624 x1v8yhc2\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n headlineEmphasis: {\n k63SB2: \"x1sfltvt\",\n $$css: true\n },\n headlineList: {\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n headlineMenu: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n interactive: {\n kkrTdU: \"x1ypdohk\",\n kVVagm: \"xln7xf2\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n interactiveLayers: {\n kWkggS: \"x83qkoq x1yl1wq7 xjqqt44 xjbqb8w\",\n $$css: true\n },\n list: {\n kAzted: \"xyax5pk\",\n $$css: true\n },\n main: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"x14qo01y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n menu: {\n kAzted: \"x1ddmzdj\",\n $$css: true\n },\n overline: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xs1w0rn\",\n kGuDYH: \"x1n35her\",\n k63SB2: \"x1su64ma\",\n kb6lSQ: \"xdlnduh\",\n kLWn49: \"xaomhve\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n $$css: true\n },\n selectedDrawer: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedList: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedMenu: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n slot: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n supporting: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n supportingInherit: {\n kMwMTN: \"x1heor9g\",\n $$css: true\n },\n supportingSelectedDrawer: {\n kMwMTN: \"x1sawysd x1k5gbb1\",\n $$css: true\n },\n supportingSelectedList: {\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n supportingSelectedMenu: {\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n threeLine: {\n kGNEyG: \"x1cy8zhl\",\n kAzted: \"x1bt55z4\",\n k8WAf4: \"x1uvvd8r\",\n $$css: true\n },\n twoLine: {\n kAzted: \"x304zwk\",\n $$css: true\n }\n};\n\n/**\n * The tone a row's muted text takes over its own muted style: the supporting\n * line and the overline, and a menu item's shortcut. Nothing while the row is\n * drawn on the surface, where the muted style's on surface variant holds;\n * the selected container's own on-colour while selected; and the row's own\n * colour while disabled. Disabled is asked first, since a disabled row's own\n * colour is already the faded one and so wins over the selected container's\n * content role. One function for every caller, so a shortcut and the\n * supporting line beside it cannot come to disagree.\n */\nfunction supportingTone(variant: RowVariant, {\n isDisabled,\n isSelected\n}: {\n isDisabled: boolean;\n isSelected: boolean;\n}) {\n if (isDisabled) {\n return rowStyles.supportingInherit;\n }\n if (!isSelected) {\n return null;\n }\n // Each variant's container is a different colour family, and the muted\n // role is not guaranteed to be readable over any of them.\n if (variant === 'drawer') {\n return rowStyles.supportingSelectedDrawer;\n }\n if (variant === 'menu') {\n return rowStyles.supportingSelectedMenu;\n }\n return rowStyles.supportingSelectedList;\n}\nexport { rowStyles, supportingTone };"],"mappings":";AAyDA,MAAMW,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,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,UAAU;EACRb,QAAQ;EACRG,QAAQ;EACRW,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAI,UAAU;EACRhB,QAAQ;EACRiB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;CACAQ,QAAQ;EACNC,QAAQ;EACRf,QAAQ;EACRgB,QAAQ;EACRC,QAAQ;EACRX,OAAO;CACT;CACAY,eAAe;EACbH,QAAQ;EACRnB,QAAQ;EACRE,QAAQ;EACRQ,OAAO;CACT;CACAa,YAAY;EACVR,QAAQ;EACRS,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,Q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ACRoD,OAAO;EACP5C,OAAO;CACT;CACA6C,YAAY;EACVtD,QAAQ;EACR+B,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR1B,OAAO;CACT;CACA8C,mBAAmB;EACjBvD,QAAQ;EACRS,OAAO;CACT;CACA+C,0BAA0B;EACxBxD,QAAQ;EACRS,OAAO;CACT;CACAgD,wBAAwB;EACtBzD,QAAQ;EACRS,OAAO;CACT;CACAiD,wBAAwB;EACtB1D,QAAQ;EACRS,OAAO;CACT;CACAkD,WAAW;EACT/D,QAAQ;EACRwB,QAAQ;EACRhB,QAAQ;EACRK,OAAO;CACT;CACAmD,SAAS;EACPxC,QAAQ;EACRX,OAAO;CACT;AACF;;;;;;;;;;;AAYA,SAASoD,eAAeC,SAAqB,EAC3CC,YACAC,cAIC;CACD,IAAID,YACF,OAAOrE,UAAU6D;CAEnB,IAAI,CAACS,YACH,OAAO;CAIT,IAAIF,YAAY,UACd,OAAOpE,UAAU8D;CAEnB,IAAIM,YAAY,QACd,OAAOpE,UAAUgE;CAEnB,OAAOhE,UAAU+D;AACnB"}
1
+ {"version":3,"file":"styles.js","names":["stylex","RowVariant","colors","radii","shadows","sizing","spacing","stateLayerOpacity","typography","HOVER_CAPABLE","FORCED_COLORS","rowStyles","base","kGNEyG","kWkggS","kMzoRj","kB7OPa","kMwMTN","k1xSpc","kOIVth","kzqmXN","k8WAf4","kg3NbH","kVAEAm","k9WMMc","kMnn75","$$css","disabled","kkrTdU","kAXs8y","dragging","kKwaWg","kGVxlE","kY2c9j","drawer","kaIpWk","kUOVxO","kAzted","drawerSurface","dropTarget","kjBf7l","kInvED","k3XXqK","kMeerF","focusVisible","headlineEmphasis","k63SB2","headlineList","kMv6JI","kGuDYH","kb6lSQ","kLWn49","kHjlTd","headlineMenu","hovered","interactive","kVVagm","interactiveLayers","list","main","kXwgrk","kzQI83","k7Eaqz","menu","overline","pressed","selectedDrawer","selectedList","selectedMenu","slot","kmuXW","slotDisabled","kSiTet","supporting","supportingInherit","supportingSelectedDrawer","supportingSelectedList","supportingSelectedMenu","threeLine","twoLine","supportingTone","variant","isDisabled","isSelected"],"sources":["../../src/row/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport type { RowVariant } from '.';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The row every list draws: ListItem's, and from here on the item of every\n// collection the coverage plan adds — ListBox, Menu, List, Tree, the options\n// of Select and ComboBox. Apart from the RowContent component in ./index.tsx\n// so that file exports components alone, which is what keeps fast refresh\n// working for it.\n//\n// Three variants, because three spec pages draw three rows. The lists page\n// gives a list item a 56dp floor, a body-large headline and a body-medium\n// supporting line, and primary container when selected. The menus page gives\n// a menu item 48dp, a label-large label, and tertiary container when\n// selected. The navigation drawer page gives its row 56dp too, with a\n// label-large label like a menu's, and marks the current one with a\n// secondary-container pill held 12dp off each edge — 336dp of indicator in a\n// 360dp container, which is what that inset comes to. The layout, the\n// padding, the state layers and the disabled treatment are one row; `list`,\n// `menu` and `drawer` carry only what the three pages disagree on, and a\n// consumer applies one of them beside `base`.\n//\n// The block padding is the lists page's 8dp, which is what puts a row's\n// 40dp leading element — an avatar, a selection checkbox — on the 56dp\n// one-line height, and a 56dp one on 72. The page pads a three-line row 12dp\n// instead, which `threeLine` carries. A menu item and a drawer row hold one\n// line of text inside a taller floor, so their padding shows only on a label\n// that wraps.\n//\n// Laid out with flex rather than the grid the design draws. The design's\n// three columns are `auto 1fr auto`, which is what flex does natively — and\n// unlike a fixed three-column grid it stays correct when a row has no leading\n// or no trailing content, where the remaining children would otherwise slide\n// into the wrong columns.\n//\n// Rows align with each other through their leading content being the same\n// size, not through a fixed column width: a list of Avatars all at one size\n// lines up, and that is the same thing the design's 40px column achieves.\n//\n// The state layer composites over `transparent` rather than over a container\n// colour, because a row's own background is transparent and it therefore\n// tints whatever it happens to be sitting on — a card, a menu, or the page.\n// The two selected states are the ones that bring a container of their own.\n\n// A pointer that can hover, for `interactiveLayers` — a plain element with no\n// render state, so its hover layer is a pseudo-class, and Chromium leaves\n// `:hover` on whatever a touch last tapped. Inside this query a touch screen\n// draws no hover at all; a touchscreen laptop still matches it for its\n// trackpad.\nconst HOVER_CAPABLE = '@media (hover: hover)';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst rowStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf xs5hli\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x1yc453h\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n dragging: {\n kWkggS: \"x14s9m32\",\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x4r79n0\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n drawer: {\n kaIpWk: \"x1dkaolv\",\n kzqmXN: \"x14atkfc\",\n kUOVxO: \"xd2r6sq\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n drawerSurface: {\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"xjp7ctv\",\n $$css: true\n },\n dropTarget: {\n kKwaWg: \"xu73ib2\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n focusVisible: {\n kKwaWg: \"x17vw94z\",\n kjBf7l: \"xrgy624 x1v8yhc2\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n headlineEmphasis: {\n k63SB2: \"x1sfltvt\",\n $$css: true\n },\n headlineList: {\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n headlineMenu: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n interactive: {\n kkrTdU: \"x1ypdohk\",\n kVVagm: \"xln7xf2\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n interactiveLayers: {\n kWkggS: \"x83qkoq x1yl1wq7 x10oam47 xkl27de xjqqt44 xjbqb8w\",\n $$css: true\n },\n list: {\n kAzted: \"xyax5pk\",\n $$css: true\n },\n main: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"x14qo01y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n menu: {\n kAzted: \"x1ddmzdj\",\n $$css: true\n },\n overline: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xs1w0rn\",\n kGuDYH: \"x1n35her\",\n k63SB2: \"x1su64ma\",\n kb6lSQ: \"xdlnduh\",\n kLWn49: \"xaomhve\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n $$css: true\n },\n selectedDrawer: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedList: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedMenu: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n slot: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n slotDisabled: {\n kMwMTN: \"x139gbkf x1bhcspo\",\n kSiTet: \"x1ppv7y9 x1tbh5bv\",\n $$css: true\n },\n supporting: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n supportingInherit: {\n kMwMTN: \"x1heor9g\",\n $$css: true\n },\n supportingSelectedDrawer: {\n kMwMTN: \"x1sawysd x1k5gbb1\",\n $$css: true\n },\n supportingSelectedList: {\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n supportingSelectedMenu: {\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n threeLine: {\n kGNEyG: \"x1cy8zhl\",\n kAzted: \"x1bt55z4\",\n k8WAf4: \"x1uvvd8r\",\n $$css: true\n },\n twoLine: {\n kAzted: \"x304zwk\",\n $$css: true\n }\n};\n\n/**\n * The tone a row's muted text takes over its own muted style: the supporting\n * line and the overline, and a menu item's shortcut. Nothing while the row is\n * drawn on the surface, where the muted style's on surface variant holds;\n * the selected container's own on-colour while selected; and the row's own\n * colour while disabled. Disabled is asked first, since a disabled row's own\n * colour is already the faded one and so wins over the selected container's\n * content role. One function for every caller, so a shortcut and the\n * supporting line beside it cannot come to disagree.\n */\nfunction supportingTone(variant: RowVariant, {\n isDisabled,\n isSelected\n}: {\n isDisabled: boolean;\n isSelected: boolean;\n}) {\n if (isDisabled) {\n return rowStyles.supportingInherit;\n }\n if (!isSelected) {\n return null;\n }\n // Each variant's container is a different colour family, and the muted\n // role is not guaranteed to be readable over any of them.\n if (variant === 'drawer') {\n return rowStyles.supportingSelectedDrawer;\n }\n if (variant === 'menu') {\n return rowStyles.supportingSelectedMenu;\n }\n return rowStyles.supportingSelectedList;\n}\nexport { rowStyles, supportingTone };"],"mappings":";AAyDA,MAAMW,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,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,UAAU;EACRb,QAAQ;EACRG,QAAQ;EACRW,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAI,UAAU;EACRhB,QAAQ;EACRiB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;CACAQ,QAAQ;EACNC,QAAQ;EACRf,QAAQ;EACRgB,QAAQ;EACRC,QAAQ;EACRX,OAAO;CACT;CACAY,eAAe;EACbH,QAAQ;EACRnB,QAAQ;EACRE,QAAQ;EACRQ,OAAO;CACT;CACAa,YAAY;EACVR,QAAQ;EACRS,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjB,OAAO;CACT;CACAkB,cAAc;EACZb,QAAQ;EACRS,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjB,OA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AQ;EACR+B,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR1B,OAAO;CACT;CACAgD,mBAAmB;EACjBzD,QAAQ;EACRS,OAAO;CACT;CACAiD,0BAA0B;EACxB1D,QAAQ;EACRS,OAAO;CACT;CACAkD,wBAAwB;EACtB3D,QAAQ;EACRS,OAAO;CACT;CACAmD,wBAAwB;EACtB5D,QAAQ;EACRS,OAAO;CACT;CACAoD,WAAW;EACTjE,QAAQ;EACRwB,QAAQ;EACRhB,QAAQ;EACRK,OAAO;CACT;CACAqD,SAAS;EACP1C,QAAQ;EACRX,OAAO;CACT;AACF;;;;;;;;;;;AAYA,SAASsD,eAAeC,SAAqB,EAC3CC,YACAC,cAIC;CACD,IAAID,YACF,OAAOvE,UAAU+D;CAEnB,IAAI,CAACS,YACH,OAAO;CAIT,IAAIF,YAAY,UACd,OAAOtE,UAAUgE;CAEnB,IAAIM,YAAY,QACd,OAAOtE,UAAUkE;CAEnB,OAAOlE,UAAUiE;AACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"focus.js","names":["stylex","colors","focus","ring","kjBf7l","kInvED","k3XXqK","kMeerF","$$css","ringVisible"],"sources":["../../src/styles/focus.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors } from '../tokens/design.tokens.stylex';\n\n// The focus ring, drawn once. Eighteen components spelled the same four\n// declarations out, which made a change to the ring eighteen edits with\n// nothing failing if one were missed.\n//\n// Only these two forms are shared, and the difference is who decides the\n// element has focus. `ring` lets the browser decide, through\n// `:focus-visible`, which is what a natively focusable element wants.\n// `ringVisible` is always solid, for a component that computes focus from\n// React Aria's render state and applies this style only when that state says\n// so — a checkbox, radio or switch, where the ring belongs on the drawn\n// control rather than on the input that actually holds focus.\n//\n// What deliberately stays with its component is every ring that differs, and\n// each of those already carries a comment saying why:\n//\n// - A different colour, because the surface underneath is not the default\n// one: Snackbar's action and close, and Chip's remove.\n// - A negative offset, drawing the ring inside the element rather than\n// around it: DropZone, NumberField, Table, a Tab and its panel, the shared\n// row, and the body of a Dialog or a Sheet while it scrolls.\n// - An offset of its own, sized to what the ring surrounds: the colour\n// thumb at 4px, the swatch at 6px, Chip's remove at 1px.\n// - A base of `outlineStyle: 'none'` that a separate style turns solid,\n// which is a different mechanism rather than a different value: the slider\n// thumb, the colour swatch picker, and the shared colour styles.\n// - An `outlineStyle` keyed on a breakpoint, for a ring that moves from one\n// element to another as the window widens: a navigation bar's destination.\nconst focus = {\n ring: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n ringVisible: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n }\n};\nexport { focus };"],"mappings":";AA+BA,MAAME,QAAQ;CACZC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,aAAa;EACXL,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"focus.js","names":["stylex","colors","focus","ring","kjBf7l","kInvED","k3XXqK","kMeerF","$$css","ringVisible"],"sources":["../../src/styles/focus.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors } from '../tokens/design.tokens.stylex';\n\n// The focus ring, drawn once. Eighteen components spelled the same four\n// declarations out, which made a change to the ring eighteen edits with\n// nothing failing if one were missed.\n//\n// Only these two forms are shared, and the difference is who decides the\n// element has focus. `ring` lets the browser decide, through\n// `:focus-visible`, which is what a natively focusable element wants.\n// `ringVisible` is always solid, for a component that computes focus from\n// React Aria's render state and applies this style only when that state says\n// so — a checkbox, radio or switch, where the ring belongs on the drawn\n// control rather than on the input that actually holds focus.\n//\n// What deliberately stays with its component is every ring that differs, and\n// each of those already carries a comment saying why:\n//\n// - A different colour, because the surface underneath is not the default\n// one: Snackbar's action and close, and Chip's remove.\n// - A different colour, because the spec gives the component its own focus\n// indicator: Card, in secondary or on surface by variant.\n// - A negative offset, drawing the ring inside the element rather than\n// around it: DropZone, NumberField, Table, a Tab and its panel, the shared\n// row, the body of a Dialog or a Sheet while it scrolls, and a bottom\n// sheet's drag handle.\n// - An offset of its own, sized to what the ring surrounds: the colour\n// thumb at 4px, the swatch at 6px, Chip's remove at 1px.\n// - A base of `outlineStyle: 'none'` that a separate style turns solid,\n// which is a different mechanism rather than a different value: the slider\n// thumb, the colour swatch picker, and the shared colour styles.\n// - An `outlineStyle` keyed on a breakpoint, for a ring that moves from one\n// element to another as the window widens: a navigation bar's destination.\n// - A shadow inside a box whose input holds focus, keyed on `:focus-within`,\n// with an outline under forced colours alone: the field chrome's box and\n// SearchField's bar.\nconst focus = {\n ring: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n ringVisible: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n }\n};\nexport { focus };"],"mappings":";AAqCA,MAAME,QAAQ;CACZC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,aAAa;EACXL,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;AACF"}
@@ -1,5 +1,13 @@
1
1
  //#region src/styles/overlay.ts
2
2
  const overlay = {
3
+ backdrop: {
4
+ k44tkh: "x1vhuh8u",
5
+ kKVMdj: "xqcmdr3",
6
+ kyAemX: "x1yujl0p",
7
+ kWkggS: "x1iqbvzf",
8
+ kB7OPa: "x9f619",
9
+ $$css: true
10
+ },
3
11
  fromBottom: {
4
12
  k3nNDw: "x18ouj0k",
5
13
  $$css: true
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.js","names":["PopoverRenderProps","stylex","colors","motion","radii","shadows","spacing","layers","FORCED_COLORS","fadeIn","scaleIn","overlay","fromBottom","k3nNDw","$$css","fromLeft","fromRight","fromTop","modalBodyRing","kjBf7l","kInvED","k3XXqK","kMeerF","modalDialog","kZKoxP","kB7OPa","k1xSpc","kXwgrk","kAzted","popup","k44tkh","kKVMdj","kyAemX","kWkggS","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kGVxlE","kMwMTN","kORKVm","kZeWKH","popupDialog","kOIVth","scrim","kpwlN0","kVAEAm","kY2c9j","origins","bottom","center","left","right","top","OverlayAlign","OverlaySide","placementOf","side","align","const","popupOrigin","placement"],"sources":["../../src/styles/overlay.ts"],"sourcesContent":["import type { PopoverRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, spacing } from '../tokens/design.tokens.stylex';\nimport './layers.stylex';\nimport { layers } from './layers.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What every overlay shares, drawn once. Popover's anchored surface and its\n// entry, Sheet's scrim, and the element that carries the dialog role inside\n// each of them; the coverage plan brings a dozen more overlays — Menu, Select,\n// ComboBox, Tooltip, the date pickers, Dialog — and each would otherwise have\n// written the same surface and the same scrim a second time. Geometry stays\n// with the component: how wide a popover is, which edge a sheet is pinned to,\n// where a dialog sits, are each overlay's own decision.\n//\n// Every one of these is portalled to the end of the body, which is why each\n// component takes a `container` prop and documents the same caveat: an app\n// that scopes its StyleX theme to a subtree has to point the portal inside it,\n// or the surface renders outside the theme and falls back to the tokens'\n// `prefers-color-scheme` default.\n//\n// Portalled to the end of the body, an element with no `z-index` paints level\n// with the page's own unlayered content, so a modal's scrim takes a layer\n// from src/styles/layers.stylex.ts, which sets the order every overlay\n// stacks in over the page.\n//\n// Entry only, and no exit animation, for the same reason in every overlay:\n// React Aria keeps a closing surface mounted only while an animation is\n// running on it, and a popover in particular is dismissed far more often than\n// it is closed deliberately — usually by pressing something else, where a\n// lingering surface is in the way of whatever the press was for.\n\n// The scrim settles before the panel it sits behind arrives: shorter than\n// any panel's entry, so the two do not finish together.\nconst fadeIn = \"x18re5ia-B\";\n\n// An anchored surface grows from the edge it is anchored by rather than from\n// its own centre, which is what makes it read as coming out of the trigger.\n// The origin is a separate style, chosen from the placement React Aria\n// reports, so the same keyframes serve all four sides.\nconst scaleIn = \"x1k48ry3-B\";\nconst overlay = {\n fromBottom: {\n k3nNDw: \"x18ouj0k\",\n $$css: true\n },\n fromLeft: {\n k3nNDw: \"x1nf803f\",\n $$css: true\n },\n fromRight: {\n k3nNDw: \"xyibjs4\",\n $$css: true\n },\n fromTop: {\n k3nNDw: \"x1dp6rp6\",\n $$css: true\n },\n modalBodyRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n modalDialog: {\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kAzted: \"x2lwn1j\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popup: {\n k44tkh: \"xvhm28k x1u6grsq\",\n kKVMdj: \"x97zbip\",\n kyAemX: \"x16dv9tl\",\n kWkggS: \"x1mjdul6\",\n kVAM5u: \"x1w1tqly\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kGVxlE: \"x1os83gw\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kORKVm: \"x1odjw0f\",\n kZeWKH: \"xish69e\",\n $$css: true\n },\n popupDialog: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n $$css: true\n },\n scrim: {\n k44tkh: \"x1vhuh8u\",\n kKVMdj: \"xqcmdr3\",\n kyAemX: \"x1yujl0p\",\n kWkggS: \"x1iqbvzf\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x125h2g0\",\n $$css: true\n }\n};\n\n// Which side the surface opened on, and the origin its entry grows from.\n// Keyed on the placement React Aria reports rather than the one asked for,\n// since the surface flips to the opposite side when there is no room on its\n// own; `center` is the placement React Aria reports for an anchor it could\n// not place beside, and grows from the top like the default.\nconst origins = {\n bottom: overlay.fromTop,\n center: overlay.fromTop,\n left: overlay.fromRight,\n right: overlay.fromLeft,\n top: overlay.fromBottom\n};\n\n/** Where along that side it lines up with the anchor. */\ntype OverlayAlign = 'center' | 'end' | 'start';\n\n/**\n * Which side of the anchor a surface opens on. `start` and `end` are the\n * inline sides by the writing direction, the right and the left in a\n * right-to-left layout; `left` and `right` stay where they are in either.\n */\ntype OverlaySide = 'bottom' | 'end' | 'left' | 'right' | 'start' | 'top';\n\n/**\n * React Aria's placement, from the side and the alignment a call site names.\n * Its own vocabulary pairs a side with `top`/`bottom` on the inline sides and\n * `start`/`end` on the block ones; a call site should not have to know which\n * of the two it is asking for, so this maps one onto the other. The inline\n * sides take in `start` and `end`, which React Aria turns into the left or\n * the right by the locale's direction as it places the surface, so what it\n * reports, and what `popupOrigin` reads, is always a physical side.\n *\n * Shared by every anchored overlay rather than kept in one, since which side\n * a surface opens on is the same question for a popover, a menu and a\n * tooltip.\n */\nfunction placementOf(side: OverlaySide, align: OverlayAlign) {\n if (align === 'center') {\n return side;\n }\n if (side === 'top' || side === 'bottom') {\n return `${side} ${align}` as const;\n }\n return `${side} ${align === 'start' ? 'top' : 'bottom'}` as const;\n}\n\n/**\n * The origin an anchored surface grows from, for the placement React Aria\n * reports through its render state. `null`, before the surface has been\n * placed, grows from the top as `bottom` does.\n */\nfunction popupOrigin(placement: PopoverRenderProps['placement']) {\n return origins[placement ?? 'bottom'];\n}\nexport type { OverlayAlign, OverlaySide };\nexport { overlay, placementOf, popupOrigin };"],"mappings":";AA+CA,MAAMW,UAAU;CACdC,YAAY;EACVC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRF,QAAQ;EACRC,OAAO;CACT;CACAE,WAAW;EACTH,QAAQ;EACRC,OAAO;CACT;CACAG,SAAS;EACPJ,QAAQ;EACRC,OAAO;CACT;CACAI,eAAe;EACbC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRP,OAAO;CACT;CACAe,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR3B,OAAO;CACT;CACA4B,aAAa;EACXjB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRgB,QAAQ;EACR7B,OAAO;CACT;CACA8B,OAAO;EACLd,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,QAAQ;EACRoB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjC,OAAO;CACT;AACF;AAOA,MAAMkC,UAAU;CACdC,QAAQtC,QAAQM;CAChBiC,QAAQvC,QAAQM;CAChBkC,MAAMxC,QAAQK;CACdoC,OAAOzC,QAAQI;CACfsC,KAAK1C,QAAQC;AACf;;;;;;;;;;;;;;AAyBA,SAAS4C,YAAYC,MAAmBC,OAAqB;CAC3D,IAAIA,UAAU,UACZ,OAAOD;CAET,IAAIA,SAAS,SAASA,SAAS,UAC7B,OAAO,GAAGA,KAAI,GAAIC;CAEpB,OAAO,GAAGD,KAAI,GAAIC,UAAU,UAAU,QAAQ;AAChD;;;;;;AAOA,SAASE,YAAYC,WAA4C;CAC/D,OAAOb,QAAQa,aAAa;AAC9B"}
1
+ {"version":3,"file":"overlay.js","names":["PopoverRenderProps","stylex","colors","motion","radii","shadows","spacing","layers","FORCED_COLORS","fadeIn","scaleIn","overlay","backdrop","k44tkh","kKVMdj","kyAemX","kWkggS","kB7OPa","$$css","fromBottom","k3nNDw","fromLeft","fromRight","fromTop","modalBodyRing","kjBf7l","kInvED","k3XXqK","kMeerF","modalDialog","kZKoxP","k1xSpc","kXwgrk","kAzted","popup","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kGVxlE","kMwMTN","kORKVm","kZeWKH","popupDialog","kOIVth","scrim","kpwlN0","kVAEAm","kY2c9j","origins","bottom","center","left","right","top","OverlayAlign","OverlaySide","placementOf","side","align","const","popupOrigin","placement"],"sources":["../../src/styles/overlay.ts"],"sourcesContent":["import type { PopoverRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, spacing } from '../tokens/design.tokens.stylex';\nimport './layers.stylex';\nimport { layers } from './layers.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What every overlay shares, drawn once. Popover's anchored surface and its\n// entry, Sheet's scrim, and the element that carries the dialog role inside\n// each of them; the coverage plan brings a dozen more overlays — Menu, Select,\n// ComboBox, Tooltip, the date pickers, Dialog — and each would otherwise have\n// written the same surface and the same scrim a second time. Geometry stays\n// with the component: how wide a popover is, which edge a sheet is pinned to,\n// where a dialog sits, are each overlay's own decision.\n//\n// Every one of these is portalled to the end of the body, which is why each\n// component takes a `container` prop and documents the same caveat: an app\n// that scopes its StyleX theme to a subtree has to point the portal inside it,\n// or the surface renders outside the theme and falls back to the tokens'\n// `prefers-color-scheme` default.\n//\n// Portalled to the end of the body, an element with no `z-index` paints level\n// with the page's own unlayered content, so a modal's scrim takes a layer\n// from src/styles/layers.stylex.ts, which sets the order every overlay\n// stacks in over the page.\n//\n// Entry only, and no exit animation, for the same reason in every overlay:\n// React Aria keeps a closing surface mounted only while an animation is\n// running on it, and a popover in particular is dismissed far more often than\n// it is closed deliberately — usually by pressing something else, where a\n// lingering surface is in the way of whatever the press was for. A sheet is\n// the one that leaves with movement, and none of it is a CSS animation: its\n// panel is moved by scrolling, since a scroll is what a swipe makes, so it\n// scrolls out as it scrolled in — see src/components/sheet/index.tsx.\n\n// The scrim settles before the panel it sits behind arrives: shorter than\n// any panel's entry, so the two do not finish together.\nconst fadeIn = \"x18re5ia-B\";\n\n// An anchored surface grows from the edge it is anchored by rather than from\n// its own centre, which is what makes it read as coming out of the trigger.\n// The origin is a separate style, chosen from the placement React Aria\n// reports, so the same keyframes serve all four sides.\nconst scaleIn = \"x1k48ry3-B\";\nconst overlay = {\n backdrop: {\n k44tkh: \"x1vhuh8u\",\n kKVMdj: \"xqcmdr3\",\n kyAemX: \"x1yujl0p\",\n kWkggS: \"x1iqbvzf\",\n kB7OPa: \"x9f619\",\n $$css: true\n },\n fromBottom: {\n k3nNDw: \"x18ouj0k\",\n $$css: true\n },\n fromLeft: {\n k3nNDw: \"x1nf803f\",\n $$css: true\n },\n fromRight: {\n k3nNDw: \"xyibjs4\",\n $$css: true\n },\n fromTop: {\n k3nNDw: \"x1dp6rp6\",\n $$css: true\n },\n modalBodyRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n modalDialog: {\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kAzted: \"x2lwn1j\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popup: {\n k44tkh: \"xvhm28k x1u6grsq\",\n kKVMdj: \"x97zbip\",\n kyAemX: \"x16dv9tl\",\n kWkggS: \"x1mjdul6\",\n kVAM5u: \"x1w1tqly\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kGVxlE: \"x1os83gw\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kORKVm: \"x1odjw0f\",\n kZeWKH: \"xish69e\",\n $$css: true\n },\n popupDialog: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n $$css: true\n },\n scrim: {\n k44tkh: \"x1vhuh8u\",\n kKVMdj: \"xqcmdr3\",\n kyAemX: \"x1yujl0p\",\n kWkggS: \"x1iqbvzf\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x125h2g0\",\n $$css: true\n }\n};\n\n// Which side the surface opened on, and the origin its entry grows from.\n// Keyed on the placement React Aria reports rather than the one asked for,\n// since the surface flips to the opposite side when there is no room on its\n// own; `center` is the placement React Aria reports for an anchor it could\n// not place beside, and grows from the top like the default.\nconst origins = {\n bottom: overlay.fromTop,\n center: overlay.fromTop,\n left: overlay.fromRight,\n right: overlay.fromLeft,\n top: overlay.fromBottom\n};\n\n/** Where along that side it lines up with the anchor. */\ntype OverlayAlign = 'center' | 'end' | 'start';\n\n/**\n * Which side of the anchor a surface opens on. `start` and `end` are the\n * inline sides by the writing direction, the right and the left in a\n * right-to-left layout; `left` and `right` stay where they are in either.\n */\ntype OverlaySide = 'bottom' | 'end' | 'left' | 'right' | 'start' | 'top';\n\n/**\n * React Aria's placement, from the side and the alignment a call site names.\n * Its own vocabulary pairs a side with `top`/`bottom` on the inline sides and\n * `start`/`end` on the block ones; a call site should not have to know which\n * of the two it is asking for, so this maps one onto the other. The inline\n * sides take in `start` and `end`, which React Aria turns into the left or\n * the right by the locale's direction as it places the surface, so what it\n * reports, and what `popupOrigin` reads, is always a physical side.\n *\n * Shared by every anchored overlay rather than kept in one, since which side\n * a surface opens on is the same question for a popover, a menu and a\n * tooltip.\n */\nfunction placementOf(side: OverlaySide, align: OverlayAlign) {\n if (align === 'center') {\n return side;\n }\n if (side === 'top' || side === 'bottom') {\n return `${side} ${align}` as const;\n }\n return `${side} ${align === 'start' ? 'top' : 'bottom'}` as const;\n}\n\n/**\n * The origin an anchored surface grows from, for the placement React Aria\n * reports through its render state. `null`, before the surface has been\n * placed, grows from the top as `bottom` does.\n */\nfunction popupOrigin(placement: PopoverRenderProps['placement']) {\n return origins[placement ?? 'bottom'];\n}\nexport type { OverlayAlign, OverlaySide };\nexport { overlay, placementOf, popupOrigin };"],"mappings":";AAkDA,MAAMW,UAAU;CACdC,UAAU;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,YAAY;EACVC,QAAQ;EACRF,OAAO;CACT;CACAG,UAAU;EACRD,QAAQ;EACRF,OAAO;CACT;CACAI,WAAW;EACTF,QAAQ;EACRF,OAAO;CACT;CACAK,SAAS;EACPH,QAAQ;EACRF,OAAO;CACT;CACAM,eAAe;EACbC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRV,OAAO;CACT;CACAW,aAAa;EACXC,QAAQ;EACRb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRT,OAAO;CACT;CACAgB,OAAO;EACLrB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;E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