@kanso-labs/kanso-ui 0.45.34 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/button/index.js +13 -9
  2. package/dist/button/index.js.map +1 -1
  3. package/dist/calendar/styles.js +12 -7
  4. package/dist/calendar/styles.js.map +1 -1
  5. package/dist/chip/label.js +1 -0
  6. package/dist/chip/label.js.map +1 -1
  7. package/dist/chip/styles.js +2 -0
  8. package/dist/chip/styles.js.map +1 -1
  9. package/dist/collection/styles.js +1 -1
  10. package/dist/collection/styles.js.map +1 -1
  11. package/dist/components/breadcrumbs/index.js +4 -1
  12. package/dist/components/breadcrumbs/index.js.map +1 -1
  13. package/dist/components/button-group/index.d.ts +16 -3
  14. package/dist/components/button-group/index.js +53 -86
  15. package/dist/components/button-group/index.js.map +1 -1
  16. package/dist/components/calendar/index.d.ts +3 -3
  17. package/dist/components/calendar/index.js.map +1 -1
  18. package/dist/components/card/index.js +5 -1
  19. package/dist/components/card/index.js.map +1 -1
  20. package/dist/components/carousel/index.js +162 -105
  21. package/dist/components/carousel/index.js.map +1 -1
  22. package/dist/components/chip/index.d.ts +38 -15
  23. package/dist/components/chip/index.js +104 -8
  24. package/dist/components/chip/index.js.map +1 -1
  25. package/dist/components/code/index.js +32 -26
  26. package/dist/components/code/index.js.map +1 -1
  27. package/dist/components/color-area/index.d.ts +5 -3
  28. package/dist/components/color-area/index.js +5 -3
  29. package/dist/components/color-area/index.js.map +1 -1
  30. package/dist/components/color-picker/index.js +6 -3
  31. package/dist/components/color-picker/index.js.map +1 -1
  32. package/dist/components/color-swatch/index.js +1 -1
  33. package/dist/components/color-swatch/index.js.map +1 -1
  34. package/dist/components/color-swatch-picker/index.js +24 -9
  35. package/dist/components/color-swatch-picker/index.js.map +1 -1
  36. package/dist/components/combo-box/index.d.ts +11 -3
  37. package/dist/components/combo-box/index.js +66 -62
  38. package/dist/components/combo-box/index.js.map +1 -1
  39. package/dist/components/copy-field/index.js +1 -0
  40. package/dist/components/copy-field/index.js.map +1 -1
  41. package/dist/components/date-picker/index.d.ts +22 -3
  42. package/dist/components/date-picker/index.js +234 -45
  43. package/dist/components/date-picker/index.js.map +1 -1
  44. package/dist/components/date-range-picker/index.d.ts +3 -1
  45. package/dist/components/date-range-picker/index.js +6 -4
  46. package/dist/components/date-range-picker/index.js.map +1 -1
  47. package/dist/components/disclosure/index.d.ts +4 -3
  48. package/dist/components/disclosure/index.js +159 -101
  49. package/dist/components/disclosure/index.js.map +1 -1
  50. package/dist/components/fab/index.d.ts +3 -1
  51. package/dist/components/fab/index.js +25 -12
  52. package/dist/components/fab/index.js.map +1 -1
  53. package/dist/components/fab-menu/index.js +1 -1
  54. package/dist/components/fab-menu/index.js.map +1 -1
  55. package/dist/components/icon-button/index.js +3 -3
  56. package/dist/components/icon-button/index.js.map +1 -1
  57. package/dist/components/index.d.ts +3 -3
  58. package/dist/components/link/index.js +2 -2
  59. package/dist/components/link/index.js.map +1 -1
  60. package/dist/components/menu/index.js +5 -2
  61. package/dist/components/menu/index.js.map +1 -1
  62. package/dist/components/navigation-bar/index.js.map +1 -1
  63. package/dist/components/navigation-rail/index.js +4 -4
  64. package/dist/components/navigation-rail/index.js.map +1 -1
  65. package/dist/components/navigation-tree/index.js +16 -13
  66. package/dist/components/navigation-tree/index.js.map +1 -1
  67. package/dist/components/popover/index.js +35 -33
  68. package/dist/components/popover/index.js.map +1 -1
  69. package/dist/components/progress-indicator/index.js +258 -172
  70. package/dist/components/progress-indicator/index.js.map +1 -1
  71. package/dist/components/range-calendar/index.js +41 -7
  72. package/dist/components/range-calendar/index.js.map +1 -1
  73. package/dist/components/search-view/index.js +1 -1
  74. package/dist/components/search-view/index.js.map +1 -1
  75. package/dist/components/segmented-button/index.d.ts +3 -2
  76. package/dist/components/segmented-button/index.js +46 -95
  77. package/dist/components/segmented-button/index.js.map +1 -1
  78. package/dist/components/select/index.js +5 -2
  79. package/dist/components/select/index.js.map +1 -1
  80. package/dist/components/slider/index.js +42 -10
  81. package/dist/components/slider/index.js.map +1 -1
  82. package/dist/components/table/index.d.ts +26 -5
  83. package/dist/components/table/index.js +93 -75
  84. package/dist/components/table/index.js.map +1 -1
  85. package/dist/components/tag/index.js +1 -0
  86. package/dist/components/tag/index.js.map +1 -1
  87. package/dist/components/time-picker/index.js +37 -5
  88. package/dist/components/time-picker/index.js.map +1 -1
  89. package/dist/components/token-field/index.js +89 -66
  90. package/dist/components/token-field/index.js.map +1 -1
  91. package/dist/components/toolbar/index.d.ts +8 -3
  92. package/dist/components/toolbar/index.js +123 -43
  93. package/dist/components/toolbar/index.js.map +1 -1
  94. package/dist/components/tree/index.js +1 -1
  95. package/dist/components/tree/index.js.map +1 -1
  96. package/dist/fab/styles.js +12 -0
  97. package/dist/fab/styles.js.map +1 -1
  98. package/dist/field/styles.js +2 -2
  99. package/dist/field/styles.js.map +1 -1
  100. package/dist/hooks/useDockedMonths.js +36 -0
  101. package/dist/hooks/useDockedMonths.js.map +1 -0
  102. package/dist/i18n/index.js +1 -0
  103. package/dist/i18n/index.js.map +1 -1
  104. package/dist/i18n/messages.js +34 -0
  105. package/dist/i18n/messages.js.map +1 -1
  106. package/dist/index.d.ts +3 -3
  107. package/dist/navigation/index.js +5 -5
  108. package/dist/navigation/index.js.map +1 -1
  109. package/dist/navigation/styles.js +5 -1
  110. package/dist/navigation/styles.js.map +1 -1
  111. package/dist/row/context.js +6 -0
  112. package/dist/row/context.js.map +1 -0
  113. package/dist/row/index.js +77 -66
  114. package/dist/row/index.js.map +1 -1
  115. package/dist/row/styles.js +15 -0
  116. package/dist/row/styles.js.map +1 -1
  117. package/dist/segments/index.js +2 -5
  118. package/dist/segments/index.js.map +1 -1
  119. package/dist/segments/literal.js +66 -0
  120. package/dist/segments/literal.js.map +1 -0
  121. package/dist/segments/styles.js +8 -0
  122. package/dist/segments/styles.js.map +1 -1
  123. package/dist/styles/chequer.js +1 -0
  124. package/dist/styles/chequer.js.map +1 -1
  125. package/dist/styles/focus.js.map +1 -1
  126. package/dist/styles.css +509 -69
  127. package/dist/toggle-group/index.js +133 -0
  128. package/dist/toggle-group/index.js.map +1 -0
  129. package/package.json +3 -3
package/dist/row/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
2
  import { hasContent } from "../render/content.js";
3
+ import { RowOnValueLineContext } from "./context.js";
3
4
  import { rowStyles, supportingTone } from "./styles.js";
4
5
  import { c } from "react/compiler-runtime";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { useContext } from "react";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
8
  // src/row/index.tsx
7
9
  /**
8
10
  * The inside of a row: the leading slot, the headline with its supporting
@@ -16,37 +18,40 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
18
  * the same arrangement around a field.
17
19
  */
18
20
  function RowContent(t0) {
19
- const $ = c(44);
21
+ const $ = c(48);
20
22
  const { chevron, children, isDisabled: t1, isEmphasized: t2, isSelected: t3, leading, overline, selection, supporting, trailing, variant: t4 } = t0;
21
23
  const isDisabled = t1 === void 0 ? false : t1;
22
24
  const isEmphasized = t2 === void 0 ? false : t2;
23
25
  const isSelected = t3 === void 0 ? false : t3;
24
26
  const variant = t4 === void 0 ? "list" : t4;
25
27
  const label = variant === "drawer" || variant === "menu";
28
+ const onValueLine = useContext(RowOnValueLineContext);
26
29
  let faded;
27
30
  let t5;
28
31
  let t6;
29
32
  let t7;
30
33
  let t8;
31
34
  let t9;
32
- if ($[0] !== chevron || $[1] !== children || $[2] !== isDisabled || $[3] !== isEmphasized || $[4] !== isSelected || $[5] !== label || $[6] !== leading || $[7] !== overline || $[8] !== selection || $[9] !== supporting || $[10] !== variant) {
35
+ if ($[0] !== chevron || $[1] !== children || $[2] !== isDisabled || $[3] !== isEmphasized || $[4] !== isSelected || $[5] !== label || $[6] !== leading || $[7] !== onValueLine || $[8] !== overline || $[9] !== selection || $[10] !== supporting || $[11] !== variant) {
33
36
  const tone = supportingTone(variant, {
34
37
  isDisabled,
35
38
  isSelected
36
39
  });
37
40
  faded = isDisabled && rowStyles.slotDisabled;
41
+ const handedBack = isSelected && rowStyles.slotSelected;
38
42
  let t10;
39
- if ($[17] !== faded || $[18] !== leading) {
43
+ if ($[18] !== faded || $[19] !== handedBack || $[20] !== leading) {
40
44
  t10 = !hasContent(leading) ? null : /* @__PURE__ */ jsx("span", {
41
- ...props(rowStyles.slot, faded),
45
+ ...props(rowStyles.slot, faded, handedBack),
42
46
  children: leading
43
47
  });
44
- $[17] = faded;
45
- $[18] = leading;
46
- $[19] = t10;
47
- } else t10 = $[19];
48
+ $[18] = faded;
49
+ $[19] = handedBack;
50
+ $[20] = leading;
51
+ $[21] = t10;
52
+ } else t10 = $[21];
48
53
  const leadingSlot = t10;
49
- if ($[20] !== chevron || $[21] !== faded || $[22] !== leadingSlot || $[23] !== selection) {
54
+ if ($[22] !== chevron || $[23] !== faded || $[24] !== handedBack || $[25] !== leadingSlot || $[26] !== selection) {
50
55
  t9 = !hasContent(chevron) && !hasContent(selection) ? leadingSlot : /* @__PURE__ */ jsxs("span", {
51
56
  ...props(rowStyles.slot),
52
57
  children: [
@@ -54,40 +59,45 @@ function RowContent(t0) {
54
59
  ...props(rowStyles.slot, faded),
55
60
  children: chevron
56
61
  }),
57
- selection,
62
+ !hasContent(selection) ? null : /* @__PURE__ */ jsx("span", {
63
+ ...props(rowStyles.slot, handedBack),
64
+ children: selection
65
+ }),
58
66
  leadingSlot
59
67
  ]
60
68
  });
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")) {
69
+ $[22] = chevron;
70
+ $[23] = faded;
71
+ $[24] = handedBack;
72
+ $[25] = leadingSlot;
73
+ $[26] = selection;
74
+ $[27] = t9;
75
+ } else t9 = $[27];
76
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
68
77
  t5 = props(rowStyles.main);
69
- $[25] = t5;
70
- } else t5 = $[25];
78
+ $[28] = t5;
79
+ } else t5 = $[28];
71
80
  t6 = !hasContent(overline) ? null : /* @__PURE__ */ jsx("span", {
72
81
  ...props(rowStyles.overline, tone),
73
82
  children: overline
74
83
  });
75
84
  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) {
85
+ if ($[29] !== isEmphasized || $[30] !== label || $[31] !== onValueLine) {
86
+ t11 = props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis, onValueLine && rowStyles.headlineOnValueLine);
87
+ $[29] = isEmphasized;
88
+ $[30] = label;
89
+ $[31] = onValueLine;
90
+ $[32] = t11;
91
+ } else t11 = $[32];
92
+ if ($[33] !== children || $[34] !== t11) {
83
93
  t7 = /* @__PURE__ */ jsx("span", {
84
94
  ...t11,
85
95
  children
86
96
  });
87
- $[29] = children;
88
- $[30] = t11;
89
- $[31] = t7;
90
- } else t7 = $[31];
97
+ $[33] = children;
98
+ $[34] = t11;
99
+ $[35] = t7;
100
+ } else t7 = $[35];
91
101
  t8 = !hasContent(supporting) ? null : /* @__PURE__ */ jsx("span", {
92
102
  ...props(rowStyles.supporting, tone),
93
103
  children: supporting
@@ -99,26 +109,27 @@ function RowContent(t0) {
99
109
  $[4] = isSelected;
100
110
  $[5] = label;
101
111
  $[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;
112
+ $[7] = onValueLine;
113
+ $[8] = overline;
114
+ $[9] = selection;
115
+ $[10] = supporting;
116
+ $[11] = variant;
117
+ $[12] = faded;
118
+ $[13] = t5;
119
+ $[14] = t6;
120
+ $[15] = t7;
121
+ $[16] = t8;
122
+ $[17] = t9;
112
123
  } else {
113
- faded = $[11];
114
- t5 = $[12];
115
- t6 = $[13];
116
- t7 = $[14];
117
- t8 = $[15];
118
- t9 = $[16];
124
+ faded = $[12];
125
+ t5 = $[13];
126
+ t6 = $[14];
127
+ t7 = $[15];
128
+ t8 = $[16];
129
+ t9 = $[17];
119
130
  }
120
131
  let t10;
121
- if ($[32] !== t5 || $[33] !== t6 || $[34] !== t7 || $[35] !== t8) {
132
+ if ($[36] !== t5 || $[37] !== t6 || $[38] !== t7 || $[39] !== t8) {
122
133
  t10 = /* @__PURE__ */ jsxs("span", {
123
134
  ...t5,
124
135
  children: [
@@ -127,34 +138,34 @@ function RowContent(t0) {
127
138
  t8
128
139
  ]
129
140
  });
130
- $[32] = t5;
131
- $[33] = t6;
132
- $[34] = t7;
133
- $[35] = t8;
134
- $[36] = t10;
135
- } else t10 = $[36];
141
+ $[36] = t5;
142
+ $[37] = t6;
143
+ $[38] = t7;
144
+ $[39] = t8;
145
+ $[40] = t10;
146
+ } else t10 = $[40];
136
147
  let t11;
137
- if ($[37] !== faded || $[38] !== trailing) {
148
+ if ($[41] !== faded || $[42] !== trailing) {
138
149
  t11 = !hasContent(trailing) ? null : /* @__PURE__ */ jsx("span", {
139
150
  ...props(rowStyles.slot, faded),
140
151
  children: trailing
141
152
  });
142
- $[37] = faded;
143
- $[38] = trailing;
144
- $[39] = t11;
145
- } else t11 = $[39];
153
+ $[41] = faded;
154
+ $[42] = trailing;
155
+ $[43] = t11;
156
+ } else t11 = $[43];
146
157
  let t12;
147
- if ($[40] !== t10 || $[41] !== t11 || $[42] !== t9) {
148
- t12 = /* @__PURE__ */ jsxs(Fragment, { children: [
158
+ if ($[44] !== t10 || $[45] !== t11 || $[46] !== t9) {
159
+ t12 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
149
160
  t9,
150
161
  t10,
151
162
  t11
152
163
  ] });
153
- $[40] = t10;
154
- $[41] = t11;
155
- $[42] = t9;
156
- $[43] = t12;
157
- } else t12 = $[43];
164
+ $[44] = t10;
165
+ $[45] = t11;
166
+ $[46] = t9;
167
+ $[47] = t12;
168
+ } else t12 = $[47];
158
169
  return t12;
159
170
  }
160
171
  export { RowContent };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["stylex","hasContent","rowStyles","supportingTone","chevron","children","isDisabled","isEmphasized","isSelected","leading","overline","selection","supporting","trailing","variant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","faded","t5","t6","t7","t8","t9","tone","slotDisabled","t10","slot","leadingSlot","Symbol","for","main","t11","headlineMenu","headlineList","headlineEmphasis","t12"],"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,SAAAe,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAd,SAAAC,UAAAC,YAAAa,IAAAZ,cAAAa,IAAAZ,YAAAa,IAAAZ,SAAAC,UAAAC,WAAAC,YAAAC,UAAAC,SAAAQ,OAAAN;CAGlB,MAAAV,aAAAa,OAAAI,KAAAA,IAAA,QAAAJ;CACA,MAAAZ,eAAAa,OAAAG,KAAAA,IAAA,QAAAH;CACA,MAAAZ,aAAAa,OAAAE,KAAAA,IAAA,QAAAF;CAMA,MAAAP,UAAAQ,OAAAC,KAAAA,IAAA,SAAAD;CAKA,MAAAE,QAAcV,YAAY,YAAYA,YAAY;CAAO,IAAAW;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAb,EAAA,OAAAb,WAAAa,EAAA,OAAAZ,YAAAY,EAAA,OAAAX,cAAAW,EAAA,OAAAV,gBAAAU,EAAA,OAAAT,cAAAS,EAAA,OAAAO,SAAAP,EAAA,OAAAR,WAAAQ,EAAA,OAAAP,YAAAO,EAAA,OAAAN,aAAAM,EAAA,OAAAL,cAAAK,EAAA,QAAAH,SAAA;EACzD,MAAAiB,OAAa5B,eAAeW,SAAS;GAAAR;GAAAE;EAGrC,CAAC;EACDiB,QAAcnB,cAAcJ,UAAS8B;EAAc,IAAAC;EAAA,IA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AAAgB;CAAA,OAAAA,MAAAhB,EAAA;CAAA,IAAAsB;CAAA,IAAAtB,EAAA,QAAAQ,SAAAR,EAAA,QAAAJ,UAAA;EACN0B,MAAA,CAACtC,WAAWY,QAAQ,IAApB,OAA+B,oBAAA,QAAA;GAAgE,GAAtDb,MAAaE,UAASgC,MAAOT,KAAK;GAAIZ,UAAAA;EAAgB,CAAA;EAAAI,EAAA,MAAAQ;EAAAR,EAAA,MAAAJ;EAAAI,EAAA,MAAAsB;CAAA,OAAAA,MAAAtB,EAAA;CAAA,IAAA0B;CAAA,IAAA1B,EAAA,QAAAgB,OAAAhB,EAAA,QAAAsB,OAAAtB,EAAA,QAAAa,IAAA;EApB7Fa,MAAA,qBAAA,UAAA,EAAA,UAAA;GAMFb;GAKDG;GASCM;EAA+F,EAAA,CAAA;EAC/FtB,EAAA,MAAAgB;EAAAhB,EAAA,MAAAsB;EAAAtB,EAAA,MAAAa;EAAAb,EAAA,MAAA0B;CAAA,OAAAA,MAAA1B,EAAA;CAAA,OArBE0B;AAqBF"}
1
+ {"version":3,"file":"index.js","names":["stylex","useContext","hasContent","RowOnValueLineContext","rowStyles","supportingTone","chevron","children","isDisabled","isEmphasized","isSelected","leading","overline","selection","supporting","trailing","variant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","onValueLine","faded","t5","t6","t7","t8","t9","tone","slotDisabled","handedBack","slotSelected","t10","slot","leadingSlot","Symbol","for","main","t11","headlineMenu","headlineList","headlineEmphasis","headlineOnValueLine","t12"],"sources":["../../src/row/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext } from 'react';\nimport { hasContent } from '../render/content';\nimport { RowOnValueLineContext } from './context';\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 onValueLine = useContext(RowOnValueLineContext);\n const tone = supportingTone(variant, {\n isDisabled,\n isSelected\n });\n const faded = isDisabled && rowStyles.slotDisabled;\n const handedBack = isSelected && rowStyles.slotSelected;\n const leadingSlot = !hasContent(leading) ? null : <span {...stylex.props(rowStyles.slot, faded, handedBack)}>{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, and so is the\n * checkbox, which a selected row hands back to forced colours with the\n * leading content — see `slotSelected` — while the caret, a button\n * drawn in the row's own colour, stays with the row.\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 {!hasContent(selection) ? null : <span {...stylex.props(rowStyles.slot, handedBack)}>\n {selection}\n </span>}\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, onValueLine && rowStyles.headlineOnValueLine)}>\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":";;;;;;;;;;;;;;;;;;;AA2EA,SAAAiB,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAd,SAAAC,UAAAC,YAAAa,IAAAZ,cAAAa,IAAAZ,YAAAa,IAAAZ,SAAAC,UAAAC,WAAAC,YAAAC,UAAAC,SAAAQ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B,oBAAA,QAAA;GAAgE,GAAtDf,MAAaI,UAASmC,MAAOX,KAAK;GAAIb,UAAAA;EAAgB,CAAA;EAAAI,EAAA,MAAAS;EAAAT,EAAA,MAAAJ;EAAAI,EAAA,MAAAyB;CAAA,OAAAA,MAAAzB,EAAA;CAAA,IAAA8B;CAAA,IAAA9B,EAAA,QAAAmB,OAAAnB,EAAA,QAAAyB,OAAAzB,EAAA,QAAAc,IAAA;EAzB7FgB,MAAA,qBAAA,YAAA,EAAA,UAAA;GASFhB;GAODK;GASCM;EAA+F,EAAA,CAAA;EAC/FzB,EAAA,MAAAmB;EAAAnB,EAAA,MAAAyB;EAAAzB,EAAA,MAAAc;EAAAd,EAAA,MAAA8B;CAAA,OAAAA,MAAA9B,EAAA;CAAA,OA1BE8B;AA0BF"}
@@ -9,6 +9,7 @@ const rowStyles = {
9
9
  k1xSpc: "x78zum5",
10
10
  kOIVth: "xxj4525",
11
11
  kzqmXN: "xh8yej3",
12
+ k3XXqK: "x1t137rt",
12
13
  k8WAf4: "x1cmllll",
13
14
  kg3NbH: "x790zyz",
14
15
  kVAEAm: "x1n2onr6",
@@ -59,6 +60,10 @@ const rowStyles = {
59
60
  kMeerF: "x1de99jn",
60
61
  $$css: true
61
62
  },
63
+ focusVisibleSelected: {
64
+ kInvED: "x2ssjo2 xzpfk5o",
65
+ $$css: true
66
+ },
62
67
  headlineEmphasis: {
63
68
  k63SB2: "x1sfltvt",
64
69
  $$css: true
@@ -81,6 +86,12 @@ const rowStyles = {
81
86
  kHjlTd: "xj0a0fe",
82
87
  $$css: true
83
88
  },
89
+ headlineOnValueLine: {
90
+ kVQacm: "xb3r6kr",
91
+ kg5iWk: "xlyipyv",
92
+ khDVqt: "xuxw1ft",
93
+ $$css: true
94
+ },
84
95
  hovered: {
85
96
  kKwaWg: "xbmfk57",
86
97
  kkrTdU: "x1ypdohk",
@@ -158,6 +169,10 @@ const rowStyles = {
158
169
  kSiTet: "x1ppv7y9 x1tbh5bv",
159
170
  $$css: true
160
171
  },
172
+ slotSelected: {
173
+ kAXs8y: "xr5dkdi",
174
+ $$css: true
175
+ },
161
176
  supporting: {
162
177
  kMwMTN: "x1w5n3ug",
163
178
  kMv6JI: "xpo2rfv",
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["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,MAAMA,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC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AAOlE,UAAUiE;AACnB"}
1
+ {"version":3,"file":"styles.js","names":["rowStyles","base","kGNEyG","kWkggS","kMzoRj","kB7OPa","kMwMTN","k1xSpc","kOIVth","kzqmXN","k3XXqK","k8WAf4","kg3NbH","kVAEAm","k9WMMc","kMnn75","$$css","disabled","kkrTdU","kAXs8y","dragging","kKwaWg","kGVxlE","kY2c9j","drawer","kaIpWk","kUOVxO","kAzted","drawerSurface","dropTarget","kjBf7l","kInvED","kMeerF","focusVisible","focusVisibleSelected","headlineEmphasis","k63SB2","headlineList","kMv6JI","kGuDYH","kb6lSQ","kLWn49","kHjlTd","headlineMenu","headlineOnValueLine","kVQacm","kg5iWk","khDVqt","hovered","interactive","kVVagm","interactiveLayers","list","main","kXwgrk","kzQI83","k7Eaqz","menu","overline","pressed","selectedDrawer","selectedList","selectedMenu","slot","kmuXW","slotDisabled","kSiTet","slotSelected","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 k3XXqK: \"x1t137rt\",\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 focusVisibleSelected: {\n kInvED: \"x2ssjo2 xzpfk5o\",\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 headlineOnValueLine: {\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\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 slotSelected: {\n kAXs8y: \"xr5dkdi\",\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 { rowSty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O;CACT;CACAyD,WAAW;EACTvE,QAAQ;EACRyB,QAAQ;EACRhB,QAAQ;EACRK,OAAO;CACT;CACA0D,SAAS;EACP/C,QAAQ;EACRX,OAAO;CACT;AACF;;;;;;;;;;;AAYA,SAAS2D,eAAeC,SAAqB,EAC3CC,YACAC,cAIC;CACD,IAAID,YACF,OAAO7E,UAAUqE;CAEnB,IAAI,CAACS,YACH,OAAO;CAIT,IAAIF,YAAY,UACd,OAAO5E,UAAUsE;CAEnB,IAAIM,YAAY,QACd,OAAO5E,UAAUwE;CAEnB,OAAOxE,UAAUuE;AACnB"}
@@ -1,14 +1,11 @@
1
1
  import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
+ import { SegmentLiteral } from "./literal.js";
2
3
  import { segmentStyles } from "./styles.js";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  import { DateSegment } from "react-aria-components";
5
6
  // src/segments/index.tsx
6
- const UNSEEN = /^[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]*$/u;
7
7
  function renderSegment(segment) {
8
- if (segment.type === "literal") return /* @__PURE__ */ jsx(DateSegment, {
9
- ...props(segmentStyles.segment, segmentStyles.segmentLiteral, !UNSEEN.test(segment.text) && segmentStyles.segmentSeparator),
10
- segment
11
- });
8
+ if (segment.type === "literal") return /* @__PURE__ */ jsx(SegmentLiteral, { segment });
12
9
  return /* @__PURE__ */ jsx(DateSegment, {
13
10
  className: segmentClassName,
14
11
  segment
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["stylex","segmentStyles","UNSEEN","renderSegment","segment","type","segmentLiteral","test","text","segmentSeparator","segmentClassName","state","isDisabled","isFocused","isPlaceholder","segmentPlaceholder","segmentFocused","segmentDisabled","className","RACDateSegment"],"sources":["../../src/segments/index.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { DateInput as RACDateInput, DateSegment as RACDateSegment } from 'react-aria-components';\nimport { segmentStyles } from './styles';\n\n// How a date or a time is drawn once React Aria has decided what its parts\n// are. Shared by DateField and TimeField, which differ only in the value they\n// hold: the segments, their order and their number all come from React Aria,\n// so what is here is the same for both.\n\n// What React Aria hands the input for each part of the date. Taken off the\n// component rather than imported, since the segment type is not on the\n// package's public surface.\ntype Segment = Parameters<NonNullable<Parameters<typeof RACDateInput>[0]['children']>>[0];\n\n// The invisible marks that keep a value's direction, which a locale can put\n// at either end of it as a literal of their own.\nconst UNSEEN = /^[\\u061c\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]*$/u;\n\n// What each segment draws. A literal — the slash or colon between two\n// segments — takes a style of its own, since it is punctuation rather than\n// something a reader types into, and the room either side of it only where\n// it takes up room: a direction mark at the start of a time is a literal\n// too, and spaced, it moved the value off the label's edge. A space is spaced\n// like a slash, since it is what stands between a time and its AM or PM.\nfunction renderSegment(segment: Segment): ReactElement {\n if (segment.type === 'literal') {\n return <RACDateSegment {...stylex.props(segmentStyles.segment, segmentStyles.segmentLiteral, !UNSEEN.test(segment.text) && segmentStyles.segmentSeparator)} segment={segment} />;\n }\n return <RACDateSegment className={segmentClassName} segment={segment} />;\n}\n\n// A segment's classes, from React Aria's render state. StyleX cannot target\n// `[data-placeholder]` on the element it is styling, so the state comes from\n// what React Aria hands the className.\n//\n// The order matters: `disabled` is last, and StyleX replaces a property\n// whole, so it wins over both the placeholder and the focused branches.\nfunction segmentClassName(state: {\n isDisabled: boolean;\n isFocused: boolean;\n isPlaceholder: boolean;\n}) {\n return stylex.props(segmentStyles.segment, state.isPlaceholder && segmentStyles.segmentPlaceholder, state.isFocused && segmentStyles.segmentFocused, state.isDisabled && segmentStyles.segmentDisabled).className ?? '';\n}\nexport { renderSegment };"],"mappings":";;;;;AAiBA,MAAME,SAAS;AAQf,SAASC,cAAcC,SAAgC;CACrD,IAAIA,QAAQC,SAAS,WACnB,OAAO,oBAACc,aAAD;EAAgB,GAAInB,MAAaC,cAAcG,SAASH,cAAcK,gBAAgB,CAACJ,OAAOK,KAAKH,QAAQI,IAAI,KAAKP,cAAcQ,gBAAgB;EAAYL;CAAQ,CAAA;CAE/K,OAAO,oBAACe,aAAD;EAAgB,WAAWT;EAA2BN;CAAQ,CAAA;AACvE;AAQA,SAASM,iBAAiBC,OAIvB;CACD,OAAOX,MAAaC,cAAcG,SAASO,MAAMG,iBAAiBb,cAAcc,oBAAoBJ,MAAME,aAAaZ,cAAce,gBAAgBL,MAAMC,cAAcX,cAAcgB,eAAe,CAAC,CAACC,aAAa;AACvN"}
1
+ {"version":3,"file":"index.js","names":["stylex","segmentStyles","renderSegment","segment","type","segmentClassName","state","isDisabled","isFocused","isPlaceholder","segmentPlaceholder","segmentFocused","segmentDisabled","className","RACDateSegment"],"sources":["../../src/segments/index.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { DateInput as RACDateInput, DateSegment as RACDateSegment } from 'react-aria-components';\nimport { SegmentLiteral } from './literal';\nimport { segmentStyles } from './styles';\n\n// How a date or a time is drawn once React Aria has decided what its parts\n// are. Shared by DateField and TimeField, which differ only in the value they\n// hold: the segments, their order and their number all come from React Aria,\n// so what is here is the same for both.\n\n// What React Aria hands the input for each part of the date. Taken off the\n// component rather than imported, since the segment type is not on the\n// package's public surface.\ntype Segment = Parameters<NonNullable<Parameters<typeof RACDateInput>[0]['children']>>[0];\n\n// What each segment draws. A literal — the slash or colon between two\n// segments — takes a style of its own, since it is punctuation rather than\n// something a reader types into — see `SegmentLiteral`.\nfunction renderSegment(segment: Segment): ReactElement {\n if (segment.type === 'literal') {\n return <SegmentLiteral segment={segment} />;\n }\n return <RACDateSegment className={segmentClassName} segment={segment} />;\n}\n\n// A segment's classes, from React Aria's render state. StyleX cannot target\n// `[data-placeholder]` on the element it is styling, so the state comes from\n// what React Aria hands the className.\n//\n// The order matters: `disabled` is last, and StyleX replaces a property\n// whole, so it wins over both the placeholder and the focused branches.\nfunction segmentClassName(state: {\n isDisabled: boolean;\n isFocused: boolean;\n isPlaceholder: boolean;\n}) {\n return stylex.props(segmentStyles.segment, state.isPlaceholder && segmentStyles.segmentPlaceholder, state.isFocused && segmentStyles.segmentFocused, state.isDisabled && segmentStyles.segmentDisabled).className ?? '';\n}\nexport { renderSegment };"],"mappings":";;;;;;AAmBA,SAASE,cAAcC,SAAgC;CACrD,IAAIA,QAAQC,SAAS,WACnB,OAAO,oBAAC,gBAAD,EAAyBD,QAAQ,CAAA;CAE1C,OAAO,oBAACW,aAAD;EAAgB,WAAWT;EAA2BF;CAAQ,CAAA;AACvE;AAQA,SAASE,iBAAiBC,OAIvB;CACD,OAAON,MAAaC,cAAcE,SAASG,MAAMG,iBAAiBR,cAAcS,oBAAoBJ,MAAME,aAAaP,cAAcU,gBAAgBL,MAAMC,cAAcN,cAAcW,eAAe,CAAC,CAACC,aAAa;AACvN"}
@@ -0,0 +1,66 @@
1
+ import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
+ import { segmentStyles } from "./styles.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { useContext } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { DateFieldStateContext, DateSegment } from "react-aria-components";
7
+ // src/segments/literal.tsx
8
+ const UNSEEN = /^[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]*$/u;
9
+ const HANGING = /^[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]*\p{P}+\s+$/u;
10
+ const DATE_PARTS = /* @__PURE__ */ new Set([
11
+ "day",
12
+ "era",
13
+ "month",
14
+ "year"
15
+ ]);
16
+ function joinsDateToTime(segments, segment) {
17
+ const index = segments.indexOf(segment);
18
+ if (index === -1) return false;
19
+ let before;
20
+ for (let at = index - 1; at >= 0 && before === void 0; at -= 1) if (segments[at].type !== "literal") before = segments[at];
21
+ const after = segments.slice(index + 1).find((candidate) => candidate.type !== "literal");
22
+ return before !== void 0 && after !== void 0 && DATE_PARTS.has(before.type) && !DATE_PARTS.has(after.type);
23
+ }
24
+ function SegmentLiteral(t0) {
25
+ const $ = c(11);
26
+ const { segment } = t0;
27
+ const state = useContext(DateFieldStateContext);
28
+ let t1;
29
+ if ($[0] !== segment.text) {
30
+ t1 = UNSEEN.test(segment.text);
31
+ $[0] = segment.text;
32
+ $[1] = t1;
33
+ } else t1 = $[1];
34
+ const seen = !t1;
35
+ let T0;
36
+ let t2;
37
+ if ($[2] !== seen || $[3] !== segment || $[4] !== state) {
38
+ const hanging = HANGING.test(segment.text);
39
+ const joining = seen && !hanging && state !== null && joinsDateToTime(state.segments, segment);
40
+ T0 = DateSegment;
41
+ t2 = props(segmentStyles.segment, segmentStyles.segmentLiteral, seen && segmentStyles.segmentSeparator, hanging && segmentStyles.segmentSeparatorHanging, joining && segmentStyles.segmentSeparatorJoining);
42
+ $[2] = seen;
43
+ $[3] = segment;
44
+ $[4] = state;
45
+ $[5] = T0;
46
+ $[6] = t2;
47
+ } else {
48
+ T0 = $[5];
49
+ t2 = $[6];
50
+ }
51
+ let t3;
52
+ if ($[7] !== T0 || $[8] !== segment || $[9] !== t2) {
53
+ t3 = /* @__PURE__ */ jsx(T0, {
54
+ ...t2,
55
+ segment
56
+ });
57
+ $[7] = T0;
58
+ $[8] = segment;
59
+ $[9] = t2;
60
+ $[10] = t3;
61
+ } else t3 = $[10];
62
+ return t3;
63
+ }
64
+ export { SegmentLiteral };
65
+
66
+ //# sourceMappingURL=literal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literal.js","names":["stylex","useContext","DateFieldStateContext","RACDateSegment","segmentStyles","UNSEEN","HANGING","DATE_PARTS","Set","joinsDateToTime","segments","segment","index","indexOf","before","at","undefined","type","after","slice","find","candidate","has","SegmentLiteral","t0","$","_c","state","t1","text","test","seen","T0","t2","hanging","joining","segmentLiteral","segmentSeparator","segmentSeparatorHanging","segmentSeparatorJoining","t3"],"sources":["../../src/segments/literal.tsx"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { useContext } from 'react';\nimport { DateFieldStateContext, DateInput as RACDateInput, DateSegment as RACDateSegment } from 'react-aria-components';\nimport { segmentStyles } from './styles';\n\n// What React Aria hands the input for each part of the date. Taken off the\n// component rather than imported, since the segment type is not on the\n// package's public surface.\ntype Segment = Parameters<NonNullable<Parameters<typeof RACDateInput>[0]['children']>>[0];\n\n// The invisible marks that keep a value's direction, which a locale can put\n// at either end of it as a literal of their own.\nconst UNSEEN = /^[\\u061c\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]*$/u;\n\n// Punctuation followed by a space, as the comma between a date and its time\n// is written, in any script, once the direction marks are set aside.\nconst HANGING = /^[\\u061c\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]*\\p{P}+\\s+$/u;\n\n// The parts of a value that belong to its date rather than its time.\nconst DATE_PARTS: ReadonlySet<string> = new Set(['day', 'era', 'month', 'year']);\n\n// Whether `segment` is a literal standing between the last part of a date\n// and the first part of its time, read off the segments around it.\nfunction joinsDateToTime(segments: readonly Segment[], segment: Segment) {\n const index = segments.indexOf(segment);\n if (index === -1) {\n return false;\n }\n // Walked back by hand: `findLast` is ES2023, and the library compiles to\n // ES2022.\n let before: Segment | undefined;\n for (let at = index - 1; at >= 0 && before === undefined; at -= 1) {\n if (segments[at].type !== 'literal') {\n before = segments[at];\n }\n }\n const after = segments.slice(index + 1).find(candidate => candidate.type !== 'literal');\n return before !== undefined && after !== undefined && DATE_PARTS.has(before.type) && !DATE_PARTS.has(after.type);\n}\n\n// A literal between two segments, with the room either side of it only where\n// it takes up room: a direction mark at the start of a time is a literal too,\n// and spaced, it moved the value off the label's edge. A space is spaced like\n// a slash, since it is what stands between a time and its AM or PM, two\n// segments narrow enough to need that room as targets. A comma and its space\n// hang off the segment before them instead — see `segmentSeparatorHanging`.\n//\n// A space standing alone between a date and its time, as Japanese writes\n// one, takes the wider room of `segmentSeparatorJoining`. Which literal that\n// is depends on the segments either side, so it is read off the field's\n// state, which holds the same segment objects React Aria hands this. A\n// TimeField has no date, and leaves that state empty.\nfunction SegmentLiteral({\n segment\n}: {\n segment: Segment;\n}) {\n const state = useContext(DateFieldStateContext);\n const seen = !UNSEEN.test(segment.text);\n const hanging = HANGING.test(segment.text);\n const joining = seen && !hanging && state !== null && joinsDateToTime(state.segments, segment);\n return <RACDateSegment {...stylex.props(segmentStyles.segment, segmentStyles.segmentLiteral, seen && segmentStyles.segmentSeparator, hanging && segmentStyles.segmentSeparatorHanging, joining && segmentStyles.segmentSeparatorJoining)} segment={segment} />;\n}\nexport { SegmentLiteral };"],"mappings":";;;;;;;AAYA,MAAMK,SAAS;AAIf,MAAMC,UAAU;AAGhB,MAAMC,6BAAkC,IAAIC,IAAI;CAAC;CAAO;CAAO;CAAS;AAAM,CAAC;AAI/E,SAASC,gBAAgBC,UAA8BC,SAAkB;CACvE,MAAMC,QAAQF,SAASG,QAAQF,OAAO;CACtC,IAAIC,UAAU,IACZ,OAAO;CAIT,IAAIE;CACJ,KAAK,IAAIC,KAAKH,QAAQ,GAAGG,MAAM,KAAKD,WAAWE,KAAAA,GAAWD,MAAM,GAC9D,IAAIL,SAASK,GAAG,CAACE,SAAS,WACxBH,SAASJ,SAASK;CAGtB,MAAMG,QAAQR,SAASS,MAAMP,QAAQ,CAAC,CAAC,CAACQ,MAAKC,cAAaA,UAAUJ,SAAS,SAAS;CACtF,OAAOH,WAAWE,KAAAA,KAAaE,UAAUF,KAAAA,KAAaT,WAAWe,IAAIR,OAAOG,IAAI,KAAK,CAACV,WAAWe,IAAIJ,MAAMD,IAAI;AACjH;AAcA,SAAAM,eAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAwB,MAAA,EAAAf,YAAAa;CAKtB,MAAAG,QAAc1B,WAAWC,qBAAqB;CAAE,IAAA0B;CAAA,IAAAH,EAAA,OAAAd,QAAAkB,MAAA;EAClCD,KAAAvB,OAAMyB,KAAMnB,QAAOkB,IAAK;EAACJ,EAAA,KAAAd,QAAAkB;EAAAJ,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAvC,MAAAM,OAAa,CAACH;CAA0B,IAAAI;CAAA,IAAAC;CAAA,IAAAR,EAAA,OAAAM,QAAAN,EAAA,OAAAd,WAAAc,EAAA,OAAAE,OAAA;EACxC,MAAAO,UAAgB5B,QAAOwB,KAAMnB,QAAOkB,IAAK;EACzC,MAAAM,UAAgBJ,QAAA,CAASG,WAAWP,UAAU,QAAQlB,gBAAgBkB,MAAKjB,UAAWC,OAAO;EACrFqB,KAAA7B;EAAmB8B,KAAAjC,MAAaI,cAAaO,SAAUP,cAAagC,gBAAiBL,QAAQ3B,cAAaiC,kBAAmBH,WAAW9B,cAAakC,yBAA0BH,WAAW/B,cAAamC,uBAAwB;EAACd,EAAA,KAAAM;EAAAN,EAAA,KAAAd;EAAAc,EAAA,KAAAE;EAAAF,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;CAAA,OAAA;EAAAD,KAAAP,EAAA;EAAAQ,KAAAR,EAAA;CAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,OAAAO,MAAAP,EAAA,OAAAd,WAAAc,EAAA,OAAAQ,IAAA;EAAjOO,KAAA,oBAAC,IAAD;GAAe,GAAKP;GAAwNtB;EAAO,CAAA;EAAIc,EAAA,KAAAO;EAAAP,EAAA,KAAAd;EAAAc,EAAA,KAAAQ;EAAAR,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OAAvPe;AAAuP"}
@@ -41,6 +41,14 @@ const segmentStyles = {
41
41
  segmentSeparator: {
42
42
  kg3NbH: "ximhkdq",
43
43
  $$css: true
44
+ },
45
+ segmentSeparatorHanging: {
46
+ kZCmMZ: "x1c1uobl",
47
+ $$css: true
48
+ },
49
+ segmentSeparatorJoining: {
50
+ kg3NbH: "xn60lsn",
51
+ $$css: true
44
52
  }
45
53
  };
46
54
  export { segmentStyles };
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["segmentStyles","input","kGNEyG","kB7OPa","k1xSpc","k3XXqK","$$css","segment","kaIpWk","knGrYV","kMwMTN","kjBf7l","kInvED","kMeerF","kg3NbH","k9WMMc","segmentDisabled","segmentFocused","kWkggS","segmentLiteral","segmentPlaceholder","segmentSeparator"],"sources":["../../src/segments/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\n\n// The segments a date or a time is typed into, shared by DateField and\n// TimeField. Apart from either component so the two cannot drift, and outside\n// `src/components` because a directory there is a public component with\n// stories, a barrel entry and a `styling.test.tsx` case — which shared styles\n// are none of.\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 segmentStyles = {\n input: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n segment: {\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n knGrYV: \"xbuiw85\",\n kMwMTN: \"x139gbkf\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"xs9jlpd\",\n k3XXqK: \"x1t137rt xc0lcac x1894zjx\",\n kMeerF: \"x1jrff4x\",\n kg3NbH: \"xdomwbk\",\n k9WMMc: \"xp4054r\",\n $$css: true\n },\n segmentDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n segmentFocused: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n segmentLiteral: {\n kMwMTN: \"x1w5n3ug\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n },\n segmentPlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n segmentSeparator: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n }\n};\nexport { segmentStyles };"],"mappings":";AAeA,MAAMA,gBAAgB;CACpBC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPC,QAAQ;EACRL,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRT,OAAO;CACT;CACAU,iBAAiB;EACfN,QAAQ;EACRJ,OAAO;CACT;CACAW,gBAAgB;EACdC,QAAQ;EACRR,QAAQ;EACRJ,OAAO;CACT;CACAa,gBAAgB;EACdT,QAAQ;EACRI,QAAQ;EACRR,OAAO;CACT;CACAc,oBAAoB;EAClBV,QAAQ;EACRJ,OAAO;CACT;CACAe,kBAAkB;EAChBP,QAAQ;EACRR,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["segmentStyles","input","kGNEyG","kB7OPa","k1xSpc","k3XXqK","$$css","segment","kaIpWk","knGrYV","kMwMTN","kjBf7l","kInvED","kMeerF","kg3NbH","k9WMMc","segmentDisabled","segmentFocused","kWkggS","segmentLiteral","segmentPlaceholder","segmentSeparator","segmentSeparatorHanging","kZCmMZ","segmentSeparatorJoining"],"sources":["../../src/segments/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\n\n// The segments a date or a time is typed into, shared by DateField and\n// TimeField. Apart from either component so the two cannot drift, and outside\n// `src/components` because a directory there is a public component with\n// stories, a barrel entry and a `styling.test.tsx` case — which shared styles\n// are none of.\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 segmentStyles = {\n input: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n segment: {\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n knGrYV: \"xbuiw85\",\n kMwMTN: \"x139gbkf\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"xs9jlpd\",\n k3XXqK: \"x1t137rt xc0lcac x1894zjx\",\n kMeerF: \"x1jrff4x\",\n kg3NbH: \"xdomwbk\",\n k9WMMc: \"xp4054r\",\n $$css: true\n },\n segmentDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n segmentFocused: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n segmentLiteral: {\n kMwMTN: \"x1w5n3ug\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n },\n segmentPlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n segmentSeparator: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n segmentSeparatorHanging: {\n kZCmMZ: \"x1c1uobl\",\n $$css: true\n },\n segmentSeparatorJoining: {\n kg3NbH: \"xn60lsn\",\n $$css: true\n }\n};\nexport { segmentStyles };"],"mappings":";AAeA,MAAMA,gBAAgB;CACpBC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPC,QAAQ;EACRL,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRT,OAAO;CACT;CACAU,iBAAiB;EACfN,QAAQ;EACRJ,OAAO;CACT;CACAW,gBAAgB;EACdC,QAAQ;EACRR,QAAQ;EACRJ,OAAO;CACT;CACAa,gBAAgB;EACdT,QAAQ;EACRI,QAAQ;EACRR,OAAO;CACT;CACAc,oBAAoB;EAClBV,QAAQ;EACRJ,OAAO;CACT;CACAe,kBAAkB;EAChBP,QAAQ;EACRR,OAAO;CACT;CACAgB,yBAAyB;EACvBC,QAAQ;EACRjB,OAAO;CACT;CACAkB,yBAAyB;EACvBV,QAAQ;EACRR,OAAO;CACT;AACF"}
@@ -6,6 +6,7 @@ const chequer = { ground: {
6
6
  kKwaWg: "x12it5ax",
7
7
  k1YJky: "x1wlk0ns",
8
8
  kgSjnq: "x1ht9rhz",
9
+ kAXs8y: "x1g12otp",
9
10
  $$css: true
10
11
  } };
11
12
  export { chequer };
@@ -1 +1 @@
1
- {"version":3,"file":"chequer.js","names":["colors","surfaceContainerHighest","chequer","ground","kWkggS","kKwaWg","k1YJky","kgSjnq","$$css"],"sources":["../../src/styles/chequer.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors } from '../tokens/design.tokens.stylex';\n\n// The chequer a transparent colour is drawn against. A half-transparent red\n// over a light surface and an opaque pink are the same pixels; this is what\n// tells them apart, behind a swatch and behind a colour slider's alpha\n// track.\n//\n// In `src/styles` rather than either component, since both draw it and a\n// second copy would be a second density to keep in step.\n//\n// Two things about the recipe are worth knowing before touching it.\n//\n// **The offsets are half a tile, not a whole one.** Four gradients draw the\n// two dark squares of a tile, and at a whole tile all four line up — the\n// pattern comes out as diamonds, which reads as a texture rather than as\n// the absence of a colour.\n//\n// **It is a layer behind, never a background on the coloured element.**\n// React Aria writes a swatch's colour to its own inline `background-color`\n// and a colour track's gradient to its inline `background`, and CSS paints a\n// background image over a background colour rather than under it — so a\n// chequer on that element would cover what it is there to reveal.\n\n// 8px squares, which reads as a chequer at a swatch's size without turning\n// into a texture.\nconst TILE = '16px';\nconst HALF = '8px';\nconst GRADIENTS = `linear-gradient(45deg, ${colors.surfaceContainerHighest} 25%, transparent 25%),\nlinear-gradient(-45deg, ${colors.surfaceContainerHighest} 25%, transparent 25%),\nlinear-gradient(45deg, transparent 75%, ${colors.surfaceContainerHighest} 75%),\nlinear-gradient(-45deg, transparent 75%, ${colors.surfaceContainerHighest} 75%)`;\nconst chequer = {\n ground: {\n kWkggS: \"x14q8lhr\",\n kKwaWg: \"x12it5ax\",\n k1YJky: \"x1wlk0ns\",\n kgSjnq: \"x1ht9rhz\",\n $$css: true\n }\n};\nexport { chequer };"],"mappings":";;AA6BkB,GAA0BA,OAAOC,0BACzBD,OAAOC,0BACSD,OAAOC,0BACND,OAAOC;AAClD,MAAMC,UAAU,EACdC,QAAQ;CACNC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,OAAO;AACT,EACF"}
1
+ {"version":3,"file":"chequer.js","names":["colors","surfaceContainerHighest","chequer","ground","kWkggS","kKwaWg","k1YJky","kgSjnq","kAXs8y","$$css"],"sources":["../../src/styles/chequer.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors } from '../tokens/design.tokens.stylex';\n\n// The chequer a transparent colour is drawn against. A half-transparent red\n// over a light surface and an opaque pink are the same pixels; this is what\n// tells them apart, behind a swatch and behind a colour slider's alpha\n// track.\n//\n// In `src/styles` rather than either component, since both draw it and a\n// second copy would be a second density to keep in step.\n//\n// Three things about the recipe are worth knowing before touching it.\n//\n// **The offsets are half a tile, not a whole one.** Four gradients draw the\n// two dark squares of a tile, and at a whole tile all four line up — the\n// pattern comes out as diamonds, which reads as a texture rather than as\n// the absence of a colour.\n//\n// **It is a layer behind, never a background on the coloured element.**\n// React Aria writes a swatch's colour to its own inline `background-color`\n// and a colour track's gradient to its inline `background`, and CSS paints a\n// background image over a background colour rather than under it — so a\n// chequer on that element would cover what it is there to reveal.\n//\n// **It opts out of forced colours.** The mode drops a background image that\n// is not a `url()` and paints the ground in Canvas, so left to it the\n// chequer goes and a translucent colour reads as a flat one. React Aria\n// already opts the swatch and the colour track out, inline, since their\n// colour is the value; the ground they are read against has to keep its\n// pattern for the same reason. Everything drawn inside the ground sits in\n// one of those two already, so the opt-out it hands down changes nothing\n// else.\n\n// 8px squares, which reads as a chequer at a swatch's size without turning\n// into a texture.\nconst TILE = '16px';\nconst HALF = '8px';\nconst GRADIENTS = `linear-gradient(45deg, ${colors.surfaceContainerHighest} 25%, transparent 25%),\nlinear-gradient(-45deg, ${colors.surfaceContainerHighest} 25%, transparent 25%),\nlinear-gradient(45deg, transparent 75%, ${colors.surfaceContainerHighest} 75%),\nlinear-gradient(-45deg, transparent 75%, ${colors.surfaceContainerHighest} 75%)`;\nconst chequer = {\n ground: {\n kWkggS: \"x14q8lhr\",\n kKwaWg: \"x12it5ax\",\n k1YJky: \"x1wlk0ns\",\n kgSjnq: \"x1ht9rhz\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n }\n};\nexport { chequer };"],"mappings":";;AAsCkB,GAA0BA,OAAOC,0BACzBD,OAAOC,0BACSD,OAAOC,0BACND,OAAOC;AAClD,MAAMC,UAAU,EACdC,QAAQ;CACNC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,OAAO;AACT,EACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"focus.js","names":["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// - Drawn by the element around the one holding focus, keyed on `:has()`,\n// for a focused element whose own edge is not the boundary a reader sees:\n// a Popover's dialog, inset inside its panel.\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":";AAwCA,MAAMA,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":["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 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// - Drawn by the element around the one holding focus, keyed on `:has()`,\n// for a focused element whose own edge is not the boundary a reader sees:\n// a Popover's dialog, inset inside its panel.\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":";AAwCA,MAAMA,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"}